How can I restrict users to creating only a single instance of my App开发者_Python百科Widget
?
In the configuration activity (which gets started after the widget was added) you can check if the user already added a widget (save a value to the preferences). If so, you can just cancel the config activity (maybe showing an explanation message). Don't forget to delete the saved value when the one widget is removed.
精彩评论