In-app purchase for Android Billing Version 3 widget

I want to restrict access to a new widget added to one of my Android applications so that it is available as an in-app purchase. Is there a way to check if a widget has been purchased, and if you do not stop the user from his ability?

I can easily request elements in Activity classes, but in AppWidgetProvider, with which I struggle to get there.

If possible, you could provide a link or some sample code to push me in the right direction.

+4
source share
1 answer

Well, since there was no help, I managed to find work around me;)

If anyone else wants to know: -

When I purchased the In-app, I add a unique identifier to the general settings and find it when it tries to create a widget.

+2
source

Source: https://habr.com/ru/post/1487375/


All Articles