DevDrawer icon indicating copy to clipboard operation
DevDrawer copied to clipboard

Missing Action Launcher / Category Launcher when executing an Activity

Open danielesegato opened this issue 12 years ago • 4 comments

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

danielesegato avatar Jun 06 '13 19:06 danielesegato

~~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.~~

mmathieum avatar Feb 17 '14 16:02 mmathieum

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.

tunitowen avatar Feb 25 '14 20:02 tunitowen

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

mmathieum avatar Feb 25 '14 22:02 mmathieum

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.

danielesegato avatar Mar 03 '14 08:03 danielesegato