I have an App with some activites and a widget. In the widget there are some controls which start different activities of my app on clicking them.
This works, if the app is currently not running (I left the app with the back key). Then the app starts with the correct activity.
If the app is running in the background (I left the app with the home key) then if I start the activity from the widget the activity I specify in StartActivity() is not started but the app is just brought to front with the last activity I used.
Is there any way to force StartActivity() to bring the specified activity to front?
In the documentation there is a note that StartActivity() should not be called from a service. Is this info up to date? Since it is the only way to open the app from a widget I think.
This works, if the app is currently not running (I left the app with the back key). Then the app starts with the correct activity.
If the app is running in the background (I left the app with the home key) then if I start the activity from the widget the activity I specify in StartActivity() is not started but the app is just brought to front with the last activity I used.
Is there any way to force StartActivity() to bring the specified activity to front?
In the documentation there is a note that StartActivity() should not be called from a service. Is this info up to date? Since it is the only way to open the app from a widget I think.