I have created a settings activity which will get fired when I press the two volume keys simultaneously. I am invoking this settings activity using an Intent from PhoneWindowManager.java as below,
Intent intent = new Intent("com.MyApp.Settings.EXT_SETUP");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intnt);
I am also running a custom launcher application. While the custom launcher is running, I am able to invoke my settings Activity by pressing the volume buttons.
But the problem is, after exiting the custom settings activity ( by calling finish()), the control is not going to the custom launcher (which is the previous active task). Instead Android is calling home launcher activity which is resulting in going to HOME screen instead of resuming my custom launcher.
I have tried the Intent flags FLAG_ACTIVITY_CLEAR_TOP
, FLAG_ACTIVITY_PREVIOUS_IS_TOP
. But nothing worked.
Please let me know on how I can invoke the custom launcher after exiting my settings Activity.
Thanks in advance, Phani