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.
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.
Source: https://habr.com/ru/post/1487375/More articles:PowerMock: a mocking static method that affects only one test - javaWhat causes the wrong SignalR FormatException cursor? - asp.net-mvcHow can I do `git push` simultaneously with two different remotes? - gitWordpress removes the short code and saves it for use elsewhere - variablesHow to access the Kendo Grid column menu only from outside the grid and add a filter parameter for certain columns in the column header - javascriptDoes AJAX not call PHP? - jqueryHow to check if a device is registered in MDM - iosclosing unused handle RODBC - rHow to free term erlang - cSharedPreferences overwrites another value - androidAll Articles