I have an application with the following activities
MainActivity > DetailActivity
If I start the DetailActivity
from the MainActivity
using the following flags in my intent
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK|Intent.FLAG_ACTIVITY_NEW_TASK);
The current task will be cleared and a new task will be started with only DetailActivity
on the stack.
However, if I currently have MainActivity
on the stack, and I start a new instance of MainActivity
from the a widget using the same flags, I get two instances of MainActivity
overlaying each-other.
Is it not possible to clear the task and start a new instance of MainActivity
from the widget?
Use Launcher more android:launchMode="singleTop"
in MainActivity, if you open MainActivity again from widget it will just call onNewIntent
method.
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
For two days, I have been trying to make my android emulator work by doing what other people on the internet did but nothing seems to workI tried choosing Software GLES 2
I'm developing an app on Android and I'm trying to use this app for location mock on Android 60