sdex / ActivityManager

Launch any application activity
Apache License 2.0
592 stars 33 forks source link

How to launch app info shortcut #57

Closed Zeit08 closed 10 months ago

Zeit08 commented 11 months ago

Hi, can someone suggest me how do I open in one click the app info screen of a precise chosen app? Screenshot_20230923-220158

I tried like this but I am no expert in this.

Thanks

sdex commented 11 months ago

Screenshot_20230924_000259_Activity Manager.jpg

The action is from: https://developer.android.com/reference/android/provider/Settings#ACTION_APPLICATION_DETAILS_SETTINGS

Zeit08 commented 11 months ago

Oh thanks I was doing it wrong.

I created the intent and tested it. It launched successfully! Now another problem is to how to create a shortcut from the intent. I have long-pressed the intent in the history page, and there is a "create a shortcut" but it brings me to the empty intent page

sdex commented 11 months ago

It's weird. Do you use the latest version? You should see the dialog Screenshot_20230924_120141_Activity Manager.jpg

Zeit08 commented 11 months ago

5.4.2 from fdroid. Yeah that dialog does not appear when I click "create shortcut".

The dev of my launcher https://github.com/MM2-0/Kvaesitso Says that shortcuts created by apps should appear in my favourite area, but they are not.

Maybe I found some incompatibility between the two apps?

sdex commented 11 months ago

Unlikely that it's incompatibility. You must see the dialog to enter the name, it happens before the app creates a new shortcut.

You can try to find some relevant logs using adb logcat if you have the Android SDK installed.

Zeit08 commented 11 months ago

Is there a way to get logs on device? I see that whenever I click "create shortcut" the app restarts and goes to the last visited screen

sdex commented 11 months ago

It looks like a crash.

You can capture bug report: https://developer.android.com/studio/debug/bug-report

drogga commented 11 months ago

I guess that you can normally create shortcuts from such apps like this one from an activity, instead of intent, if that's the case and you didn't forget to allow the shortcut creation from the App Info screen (in case you use a Chinese brand device, like Xiaomi, Huawei or some of those) and it indeed crashes, then the easiest method to grab/capture the crash log would be "Scoop" (fork by TacoTheDank -here on GH), but you still have to used ADB anyway to "activate" it...

Zeit08 commented 10 months ago

Solved. Somehow my launcher did not have launcher shortcut creation enabled from system