|
| 1 | +page.title=Application Licensing |
| 2 | +@jd:body |
| 3 | + |
| 4 | + |
| 5 | +<p>Android Market offers a licensing service that lets you enforce licensing policies for |
| 6 | +applications that you publish on Android Market. With Android Market Licensing, your application can |
| 7 | +query Android Market at run time to obtain the licensing status for the current user, then allow or |
| 8 | +disallow further use as appropriate. </p> |
| 9 | + |
| 10 | +<p>Using the service, you can apply a flexible licensing policy on an application-by-application |
| 11 | +basis—each application can enforce licensing in the way most appropriate for it. If necessary, |
| 12 | +an application can apply custom constraints based on the licensing status obtained from Android |
| 13 | +Market. For example, an application can check the licensing status and then apply custom constraints |
| 14 | +that allow the user to run it unlicensed for a specific validity period. An application can also |
| 15 | +restrict use of the application to a specific device, in addition to any other constraints. </p> |
| 16 | + |
| 17 | +<p>The licensing service is a secure means of controlling access to your applications. When an |
| 18 | +application checks the licensing status, the Android Market server signs the licensing status |
| 19 | +response using a key pair that is uniquely associated with the publisher account. Your application |
| 20 | +stores the public key in its compiled <code>.apk</code> file and uses it to verify the licensing |
| 21 | +status response.</p> |
| 22 | + |
| 23 | +<p>Any application that you publish through Android Market can use the Android Market Licensing |
| 24 | +service. No special account or registration is needed. Additionally, because the service uses no |
| 25 | +dedicated framework APIs, you can add licensing to any application that uses a minimum API level of |
| 26 | +3 or higher.</p> |
| 27 | + |
| 28 | +<p class="note"><strong>Note:</strong> The Android Market Licensing service is primarily intended |
| 29 | +for paid applications that wish to verify that the current user did in fact pay for the application |
| 30 | +on Android Market. However, any application (including free apps) may use the licensing service |
| 31 | +to initiate the download of an APK expansion file. In which case, the request that your application |
| 32 | +sends to the licensing service is not to check whether the user paid for the app, but to request the |
| 33 | +URL of the expansion files. For information about downloading expansion files for your application, |
| 34 | +read the guide to <a href="{@docRoot}guide/market/expansion-files.html">APK Expansion Files</a>.</p> |
| 35 | + |
| 36 | + |
| 37 | +<p>To learn more about Android Market's application licensing service and start integrating it into |
| 38 | +your applications, read the following documents:</p> |
| 39 | + |
| 40 | +<dl> |
| 41 | + <dt><strong><a href="{@docRoot}guide/market/licensing/overview.html">Licensing |
| 42 | +Overview</a></strong></dt> |
| 43 | + <dd>Describes how the service works and what a typical licensing implementation looks |
| 44 | +like.</dd> |
| 45 | + <dt><strong><a href="{@docRoot}guide/market/licensing/setting-up.html">Setting Up for |
| 46 | +Licensing</a></strong></dt> |
| 47 | + <dd>Explains how to set up your Android Market account, development environment, and |
| 48 | +testing environment in order to add licensing to your app.</dd> |
| 49 | + <dt><strong><a href="{@docRoot}guide/market/licensing/adding-licensing.html">Adding |
| 50 | +Licensing to Your App</a></strong></dt> |
| 51 | + <dd>Provides a step-by-step guide to add licensing verification to your application.</dd> |
| 52 | + <dt><strong><a href="{@docRoot}guide/market/licensing/licensing-reference.html">Licensing |
| 53 | +Reference</a></strong></dt> |
| 54 | + <dd>Provides detailed information about the licensing library's classes and the service response |
| 55 | +codes.</dd> |
| 56 | +</dl> |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
0 commit comments