question

gamedroids avatar image
gamedroids asked

what happens when DRM check failes

Hello, I would like to know if my App can start, even when the [b]DRM[/b] check fails? Everywhere I look (forums, FAQ..) it states something like this: "[i]If you uninstall the Appstore Software from your device or sign out of your Amazon.com account in the Appstore Software, you will not be able to access or use any Apps on your device that Publishers have protected with DRM[/i]" So, it looks like the App would not be able to start when the DRM check is not successful (either because the app is pirated or the user is not connected with the appstore software). What I would like to do is, test if the user bought the app ([i]successful[/i] DRM check) – every time the app starts. - If the [b]app was bought[/b] (DRM check successful), there should be no advertisements at all and everything is fine. - If however[b] the app was pirated[/b] (or the user just didn't have any luck with the DRM test, because of one of the reasons above), he should still be able to use the full app, but with advertisements this time. I am hoping that this way I can still earn a little money with ads, when people pirate the app (which unfortunately happened a lot in my first app). Now, I saw code, how to check if the DRM test was positive, but how can I check if it was negative? And would the app even start when it was negative? How can I influence what happens with the DRM test result? thanks everybody for your time! Christoph
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Gamedroids, Thank you for writing to us. You can detect a successful DRM verification by implementing the following callback in your code: Class : public static class com.amazon.drm.AmazonLicenseVerificationCallback Method : public static onDRMSuccess Example: package com.amazon.drm; import android.util.Log; public class AmazonLicenseVerificationCallback { private static final String TAG = "AmazonLicenseVerificationCallback"; public static void onDRMSuccess() { Log.v(TAG, "onDRMSuccess called!"); } } This may or may not be helpful in your specific case. We don't currently have a method for detecting DRM failure, only success.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gamedroids avatar image
gamedroids answered
sorry, I am still not quite sure how this works. I implemented the above message as you proposed, but who is actually calling this method, and when? And let's say the method was called – how can I signal my application, that it was called?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Gamedroids, You have to define a static class named AmazonLicenseVerificationCallback under com.amazon.drm package in your project. This class should have a static method named onDRMSuccess. Now you would get a call to this method while the app is downloaded from app store and launched. From here then you can notify your activities about drm success. You can have static method in your activity to be called from onDRMSuccess. Or you can send a internal broadcast. Or pass your activity instance from onCreate to AmazonLicenseVerificationCallback and receive callback once onDRMSuccess is called.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.