diff options
-rw-r--r-- | docs/html/guide/publishing/publishing.jd | 117 | ||||
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 12 |
2 files changed, 104 insertions, 25 deletions
diff --git a/docs/html/guide/publishing/publishing.jd b/docs/html/guide/publishing/publishing.jd index c027f4d97be0..0c087efa0120 100644 --- a/docs/html/guide/publishing/publishing.jd +++ b/docs/html/guide/publishing/publishing.jd @@ -121,6 +121,9 @@ certificate do <em>not</em> match those of the existing version, Market will consider it a new application and will not offer it to users as an update.</p> + + + <h3 id="marketintent">Using Intents to Launch the Market Application on a Device</h3> @@ -141,9 +144,37 @@ startActivity() to send the ACTION_VIEW Intent with the Market-handled URI.</p> <p>The URI that you supply with the Intent lets the system route the intent properly and also expresses the type of action that you want Market to perform -after launch. Currently, you can have Market initiate a search for applications -on Android Market, based on query parameters that you provide. For example, you -can specify URIs to search for applications by:</p> +after launch. Currently, you can have Market take these actions:</p> + +<ul> +<li>Initiate a search for applications on Android Market, based on the query +parameters that you provide, or </li> +<li>Load the Details page for a specific application on Android Market, based on +the application's package name.</li> +</ul> + +<h4>Initiating a search</h4> + +<p>Your application can initiate a search on Android Market for applications +that match the query parameters that you provide. To do so, your application +sends an ACTION_VIEW Intent that includes a URI and query parameters in this +format:</p> + +<p style="margin-left:2em"><code>market://search?q=<paramtype>:<value></code></p> + +<div class="sidebox-wrapper" xstyle="margin-bottom:2em;margin-top:.5em;width:90%;"> + <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> + <div id="qv-sub-rule"> + <img src="{@docRoot}assets/images/icon_market.jpg" style="float:left;margin:0;padding:0;"> + <p style="color:#669999;">Searches on Android Market</p> +<p>When you initiate a search, Android Market returns results from matches in +the public metadata supplied by developers in their Android Market profiles or +application publishing information, but not from the developer's private account +or from the certificate used to sign the application. </p> + </div> +</div> + +<p>Using this URI format, you can search for applications by:</p> <ul> <li>Package name</li> @@ -153,33 +184,73 @@ description, or </li> <li>Any combination of the above</li> </ul> -<p>Note that the URI queries return results from the public metadata supplied by -developers in their Android Market profiles or application publishing -information, but not from the developer's private account or from the -certificate used to sign the application. </p> +<p>The table at the bottom of this page specifies the <code>paramtypes</code> +and <code>values</code> that correspond to each of these types of search. </p> + +<p>When you send an intent to initiate a search for applications, Market sends +the search query to the server and displays the result. To the user, the +experience is something like this: </p> + +<ol> +<li>The user presses a link or button in your application.</li> +<li>The Market application launches and takes control of the screen, displaying +a progress indicator labeled "Searching" until it receives the search +results.</li> +<li>Market receives the search results and displays them. Depending on the query +parameters, the search results may include a list of one or more applications. +</li> +<li>From the results page, the user can select an app to go to its Details page, +which offers information about the app and lets the user download/purchase the +app.</li> +</ol> + +<h4>Loading an application's Details page</h4> + +<p>In Android Market, every application has a Details page that provides an +overview of the application for users. For example, the page includes a short +description of the app and screen shots of it in use, if supplied by the +developer, as well as feedback from users and information about the developer. +The Details page also includes an "Install" button that lets the user trigger +the download/purchase of the application.</p> + +<p>If you want to refer the user to a specific appplication, your application +can take the user directly to the application's Details page. To do so, your +application sends an ACTION_VIEW Intent that includes a URI and query parameter +in this format:</p> + +<p style="margin-left:2em"><code>market://details?id=<packagename></code></p> + +<p>In this case, the <code>packagename</code> parameter is target application's +fully qualified package name, as declared in the <code>package</code> attribute +of the <code>manifest</code> element in the application's manifest file. For example:</p> + +<p style="margin-left:2em"><code>market://details?id=com.example.android.jetboy</code></p> + +<h4>Android Market URIs</h4> <p>The table below provides a list of URIs and actions currently supported by the Market application.</p> +<p>Note that these URIs work only when passed as Intent data — you +can't currently load the URIs in a web browser, either on a desktop machine or +on the device. </p> + <table> <tr> -<th>For this Result</th> +<th width="25%">For this Result</th> <th>Pass this URI with the ACTION_VIEW Intent</th> -<th>Comments</th> +<th width="36%">Comments</th> </tr> - -<!-- <tr> -<td>Display the details screen for a specific application, as identified -by its Market appID string.</td> -<td><code>http://market.android.com/details?id=<appMarketAppIdString></code> +<td>Display the Details screen for a specific application, as identified +by the app's fully qualified package name.</td> +<td><code>http://market.android.com/details?id=<packagename></code> or<br> -<code>market://details?id=<appMarketUidString></code></td> -<td>Note that Market appID is specific to an application -<em>and</em> its version. That is, an appID query loads the details page -for a specific version of an application.</td> +<code>market://details?id=<packagename></code></td> +<td>Note that the package name that you specify is <em>not</em> specific to any +version of an application. Therefore, Market always displays the Details page for the +latest version of the application.</td> </tr> ---> <tr> <td>Search for an application by its fully qualified Java package name and display the result.</td> @@ -191,8 +262,8 @@ matches.</td> <tr> <td>Search for applications by developer name and display the results.</td> -<td><code>http://market.android.com/search?q=pub:"<Developer Name>"</code> -or<br> <code>market://search?q=pub:"<Developer Name>"</code></td> +<td><code>http://market.android.com/search?q=pub:<Developer Name></code> +or<br> <code>market://search?q=pub:<Developer Name></code></td> <td>Searches only the "Developer Name" fields of Market public profiles. Returns exact matches only. </td> </tr> @@ -212,7 +283,3 @@ matches.</td> <td>Returns a list of applications meeting all the supplied parameters. </td> </tr> </table> - -<p>Note that these URIs work only when passed as intent data — you -can't currently load the URIs in a web browser, either on a desktop machine or -on the device. </p>
\ No newline at end of file diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index 3180a17e2db5..e312df6cca20 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -2378,6 +2378,18 @@ public class WindowManagerService extends IWindowManager.Stub mInputMethodWindow = win; imMayMove = true; } + if (win.mAttrs.type == TYPE_BASE_APPLICATION + && win.mAppToken != null + && win.mAppToken.startingWindow != null) { + // Special handling of starting window over the base + // window of the app: propagate lock screen flags to it, + // to provide the correct semantics while starting. + final int mask = + WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED + | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD; + WindowManager.LayoutParams sa = win.mAppToken.startingWindow.mAttrs; + sa.flags = (sa.flags&~mask) | (win.mAttrs.flags&mask); + } } else { win.mEnterAnimationPending = false; if (win.mSurface != null) { |