ActivityLauncher icon indicating copy to clipboard operation
ActivityLauncher copied to clipboard

Not able to launch some activities as shortcuts, particularly those not of the main user

Open pressRtowin opened this issue 2 years ago • 14 comments

This may be multiple issues, but I'm not sure where each begins and ends if that makes sense. There are lots of similarities to the issues described here (https://github.com/butzist/ActivityLauncher/issues/171), but I also experienced some problems before updating to 13.

My main use case for Activity Launcher has been to launch hidden apps on the various user profiles I use simultaneously on my Samsung devices. To those of you who are not familiar with this, this is not the same as traditional user accounts on Android, as the apps in these profiles can be run without logging out of the main account. If you're familiar with Work Profiles, these work the same way, however rather than just being limited to your main profile and Work Profile, on Samsung phones, you can have two additional sets of apps via Secure Folder and Dual Messenger.

I have a copy of Activity Launcher installed on all 4 profiles (Main, Dual Messenger, Work, Secure Folder), and I can use it to reach usually inaccessible places (such as the Work Profile's settings app, from where I can properly set things like the aspect ratio and camera cutout settings for Work Profile apps).

For some reason, I've found that many activities can correctly be launched from within the respective instance of Activity Launcher, but once I add it as a shortcut to my home screen, it no longer functions. Since updating to Android 13, almost all shortcuts created from the 3 non-main instances of Activity Launcher give me the "App isn't installed." error, while a large number of shortcuts created from the Main profile instance also give me the same error. (And yes, I've recreated all shortcuts after updating).

I'm using the latest Play Store version (in the beta channel) as well, but this doesn't seem to make a difference. Any clue what's going on?

pressRtowin avatar Jan 25 '23 22:01 pressRtowin

Does other similar apps work properly, like for example the one by /sdex/ActivityManager (available here on GitHub) ?

drogga avatar Jan 26 '23 20:01 drogga

I tried that app, another one you mentioned in a different issue, and multiple others, and got similar results. As far as I remember, most other apps I tried worked just as well or worse.

pressRtowin avatar Jan 26 '23 21:01 pressRtowin

@drogga

I went and did some more thorough testing between four different apps (Shortcut Maker, App Manager, Activity Manager, and Activity Launcher) and have documented the results here.

All four apps were installed on my Z Fold 4 running Android 13/One UI 5 a total of four times as mentioned above: on the Main user (User 0), within the Dual Messenger profile (User 95), within the Work profile (User 10), and within Secure Folder (User 150). I then created shortcuts for each of the following from all sixteen (four apps across four profiles) instances of the applications:

  • com.android.settings.homepage.SettingsHomepageActivity
  • com.android.settings.Settings$FullScreenAppsSettingsActivity
  • com.android.settings.Settings$CameraCutoutSettingsActivity
  • com.android.settings.Settings$FrontScreenAppsSettingsActivity
  • com.android.settings.Settings$AutoRotateAppsSettingsActivity
  • com.android.settings.Settings$AppDashboardActivity
  • com.android.settings.Settings$ManageApplicationsActivity
  • com.android.settings.Settings$ManageDomainUrlsActivity
  • com.android.settings.Settings$HighPowerApplicationsActivity

When trying to launch these shortcuts, three possible behaviors were observed:

  • The correct activity would launch
  • An activity would launch, but not the correct one (this was always in the case of a shortcut intended to launch a Dual Messenger app incorrectly launching the Main profile app instead)
  • Nothing would launch

The three behaviors have been denoted by a green, orange, and red circle respectively drawn around the shortcut which exhibited that behavior.

Note that I only tested launching activities from shortcuts on the home page, and not from within the app, as that is what matters the most (and I wouldn't really care too much if an activity could not be launched from within the app, so long as it launched correctly from the shortcut).

Lastly, I did try (and succeed) launching all of these activities (under the correct profiles) via LADB and wireless debugging (with the exception of Secure Folder, as User 150 is now restricted from ADB), so theoretically it should be possible to launch them all correctly.


On an unrelated note, I seem to have found a bug in Activity Manager while doing all this. If you take any number of activities that share the same default name (for instance com.android.settings.Settings$AppDashboardActivity and com.android.settings.Settings$ManageApplicationsActivity are both named "Apps") and try to add them as shortcuts without leaving the app (or without having the app open as a pop-up window; what matters is that the launcher is not visible), only one shortcut will have been made (for the activities that share a name) when returning to the launcher. Furthermore, if you do return to the launcher between each shortcut being made (or make the shortcuts while using Activity Launcher as a pop-up window), then multiple shortcuts will be made, however, all subsequent shortcuts after the first will behave as the first shortcut does, rather than launching their intended activities. Renaming the activities with shared names when creating the shortcuts avoids this (which is why in the tests above, each instance of com.android.settings.Settings$AppDashboardActivity from Activity Launcher was renamed to "App Dashboard".

pressRtowin avatar Feb 03 '23 00:02 pressRtowin

Hello, Any news on this ? I'm experiencing the same issue with developer options. Launching from app works fine, but launching from shortcut doesn't ("Please enable developer options first"). Yet launching from system settings works fine as well. Thanks

KaKi87 avatar Feb 15 '23 06:02 KaKi87

I don't mind using a fork to get this fix if the original's maintainer doesn't care, which seems to be the case considering the absence of comment from them.

KaKi87 avatar Feb 15 '23 10:02 KaKi87

@drogga Please keep meta-discussions out of the issues. Instead, I suggest to create an issue template with guidelines and delete comments that do not follow those.

@Sash0k Let's keep the language in English here to make life easier for the contributors. We already have very little time to invest into this project and therefore I usually ignore comments if I have to pipe them through Google translate first. Hope that is acceptable for you. Btw thank you for maintaining a fork of the app. If you have some features that you would like integrated here, feel free to create a PR.

butzist avatar Feb 15 '23 21:02 butzist

Please keep meta-discussions out of the issues. Instead, I suggest to create an issue template with guidelines and delete comments that do not follow those.

So you are so uninterested in maintaining your app that you even require PRs from others for community management ?

KaKi87 avatar Feb 15 '23 23:02 KaKi87

See #51

butzist avatar Feb 16 '23 05:02 butzist

Since @Ismael034 's fix for Android 13, we are starting all activities via a proxy activity in AL, that in turn starts the linked app. So on theory this should be identical to launching your app from AL.

butzist avatar Feb 16 '23 08:02 butzist

Since @Ismael034 's fix for Android 13, we are starting all activities via a proxy activity in AL, that in turn starts the linked app. So on theory this should be identical to launching your app from AL.

Not necessarily for copies installed in other profiles, I think, depending on the methods used. I'll have to check again to see if there's a difference (as noted, I only checked from shortcuts for the testing above), but I know many apps have trouble distinguishing dual messenger apps in particular, so I believe only apps coded a very specific way are able to do so successfully.

pressRtowin avatar Feb 16 '23 09:02 pressRtowin

If you're talking about the 1.14.6 tag then I confirm the issue is occuring on that very version.

Personally I'm using the main profile.

KaKi87 avatar Feb 16 '23 09:02 KaKi87

If you're talking about the 1.14.6 tag then I confirm the issue is occuring on that very version.

Personally I'm using the main profile.

They're talking about whether or not the behavior is the same launching from within the app vs from a shortcut.

pressRtowin avatar Feb 16 '23 09:02 pressRtowin

Since @Ismael034 's fix for Android 13, we are starting all activities via a proxy activity in AL, that in turn starts the linked app. So on theory this should be identical to launching your app from AL.

I just tested and found there is a difference in some cases. For example, I can launch com.android.settings.homepage.SettingsHomepageActivity for User 10 (the work profile) successfully from within ActivityLauncher, while attempting the same from a shortcut results in the "App isn't installed" error.

pressRtowin avatar Feb 16 '23 09:02 pressRtowin

On the other hand, I'm unable to launch almost all of the activities mentioned above in the correct app on the Dual Messenger profile (User 95). They almost all launch in the User 0 settings app instead (when launching from within the app, or from shortcuts as mentioned in my findings previously).

pressRtowin avatar Feb 16 '23 09:02 pressRtowin

still valid with v2? reopen if necessary

butzist avatar Apr 13 '24 13:04 butzist