I have one simple widget consisting in a simple button that launches the main Activity. But I have a problem, when I open the app from the launcher, press the home button and relaunch the app from the widget and the activity appears twice. How can I fix that?
Thanks
You have to use
After adding Intent.FLAG_ACTIVITY_CLEAR_TOP flag
If you have already Activity is opened and you are again starting that Activity then it will restart your Activity.It will not start another instance of Activity