DevDrawer
DevDrawer copied to clipboard
Missing Action Launcher / Category Launcher when executing an Activity
Hi,
I had a bug in my app that caused it to crash when launched by DevDrawer.
Reason is that DevDrawer do not set a action LAUNCHER when executing the activity.
I think it should
~~The app should launch an app this way by default:~~
// activity.startActivity(activity.getPackageManager().getLaunchIntentForPackage(packageName));
~~Most of all, it should not use the flag Intent.FLAG_ACTIVITY_NEW_TASK by default.~~
https://android.googlesource.com/platform/packages/apps/Launcher3/+/master/src/com/android/launcher3/Launcher.java
Line 2349
This is why this Intent flag is used. But happy to discuss.
My bad, you're right @tunitowen. DevDrawer works as intended.
Apparently it's up to the app to check if another instance of the app is already started: http://stackoverflow.com/questions/4341600/how-to-prevent-multiple-instances-of-an-activity-when-it-is-launched-with-differ/7748416#7748416 https://code.google.com/p/android/issues/detail?id=2373 https://code.google.com/p/android/issues/detail?id=5277 https://code.google.com/p/android/issues/detail?id=26658
I want to clarify my bug report.
The bug in my app (I assumed an action was always set) made me discover the bug in DevDrawer (and vice-versa actually).
The default launcher (stock android) always set Action = LAUNCHER when I open an application. I think DevDrawer should mimic that.