简体   繁体   中英

In-App purchase for widget Android Billing Version 3

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM