Reputation: 10222
I had developed a game intending to publish it as a paid application using the Android LVL with the default ServerManagedPolicy
licensing policy. Now, the powers that be have decided that we have to publish it as a free app. For some reason I do not want to remove/disable the license checks. My question is: how does the licensing service handle free apps? Will checks always fail or always pass? Is there any way I can make the license service accept any installation of my free app as licensed?
I found the following on free apps in the official documentation, but, it doesn't help me much.
Only paid applications published through Market can use the service.[...] Licensing is currently for paid apps only, since free apps are considered licensed for all users.
I would have assumed that checks will fail, but, I remember reading somewhere that for free apps the licensing server will return a very large validity timestamp (long.MAX) ensuring that the license is always valid for free apps. Unfortunately, I have lost the link to that source.
Note: The problem is not as crazy as it sounds. It's just that I am not able to explain my use case further without giving away some proprietary information.
Upvotes: 5
Views: 2802
Reputation: 2026
I was just dealing with the same issue and I found that the information here is outdated so I give you the updated version. It is now possible to upload apks for free apps that request the com.android.vending.CHECK_LICENSE permission. However, this does not mean that your app can actually use it. In the licensing overview is says under "Requirements and Limitations"
- You can implement licensing controls for a free app, but only if you're using the service to provide APK expansion files.
I did not know this and I tried anyway. The Upload works fine (although it is a free app and I don't have any expansion files) but users don't get a response from the licensing service. The confusing part is that, when you are logged in with the developer account, you get the test response that you chose in your developer profile and thus might think everything works.
Upvotes: 4
Reputation: 2296
Pulled this straight from the licensing tutorial:
Considerations for Free Apps
Licensing is currently supported only for paid applications. If you already published your application as free, you won't be able to upload an updated version that includes licensing (that is, an application that uses the same package name and that includes the licensing permission). Here are some points to keep in mind:
If you want to offer a free version of your application that provides a reduced feature set (or that offers the full feature set for trial period), the free version of your application must not include the licensing permission and must use a different package name than the paid version of the app. If you want to offer a paid version of your free application that uses licensing, you can do so under a new package name.
What you remember reading is probably this:
For a free application, the server sets the validity period to a very high value (long.MAX_VALUE). This ensures that, provided the Policy has cached the validity timestamp locally, it will not need to recheck the license status of the application in the future.
Which is in regards to this:
The server considers a user licensed if the user is recorded to have purchased the application, or if the application is available for free.
Upvotes: 4
Reputation: 10222
Not getting any answers here, I posted the same question on the Android Developers group. Here is the the best answer I got:
Technically the backend license servers allow it and return a large validity timestamp, BUT... The market publisher console will not allow you to upload an APK that's free and requests the com.android.vending.CHECK_LICENSE permission.
In practice, this means that free apps cannot use the LVL, because you won't be able to upload them.
Trevor Johns, Developer Programs Engineer, Android
Upvotes: 3