Question

I am looking to restrict access to a new widget I have added to one of my Android apps, so that it is available as an In-App purchase. Is there a way to check to see if the widget as been purchased and if not the stop the user from being able to use it?

I can easily query items in Activity classes but in the AppWidgetProvider I am struggling to get there.

If it is possible, could you provide either a link or some sample code to nudge me in the right direction.

Était-ce utile?

La solution

Okay, since there was no help I managed to find a work around myself ;)

Incase anyone else wants to know :-

When the In-app product is purchased I add a unique identifier to the shared preferences and recall it when it tries to create the widget.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top