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