Mike Bannion SW
- Forum posts: 2
Jun 16, 2012, 11:10:21 PM via Website
Jun 16, 2012 11:10:21 PM via Website
In my app, I check for the license in my service, not in an activity. I managed to make it (mostly) work fine, the problem is that, when the user gets an ERROR_NOT_AUTHENTICATED error, the library is unable to show the alert dialog to prompt for the Android PIT credentials, since you cannot launch dialogs from a service. So, I tried to add a way to ALSO check for the license in the main activity of my app: the idea is to redirect my user to my app when the license check fails, so that the alert dialog can be displayed there.
Unfortunately, this doesn't work: the license check works as expected in the service, but if I try to do the same (with exactly the same code) in my activity, I always get a ERROR_COMMUNICATING_WITH_APPCENTER_0113 error. The documentation is very poor to be polite, and this error is notr even documented anywhere. I had to go through the code to see this happens when a Null Pointer Exception is met somewhere in the request: obviously where is still a mystery, since from that point on we enter the dark realm of remote calls.
What's going wrong and why? how do I fix it? and if I cannot fix it, how can I provide those credentials in a different way?
Unfortunately, this doesn't work: the license check works as expected in the service, but if I try to do the same (with exactly the same code) in my activity, I always get a ERROR_COMMUNICATING_WITH_APPCENTER_0113 error. The documentation is very poor to be polite, and this error is notr even documented anywhere. I had to go through the code to see this happens when a Null Pointer Exception is met somewhere in the request: obviously where is still a mystery, since from that point on we enter the dark realm of remote calls.
What's going wrong and why? how do I fix it? and if I cannot fix it, how can I provide those credentials in a different way?
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.