This tutorial will cover a package/activity which is in the gray zone...
a. It's public (but it's not exported) <== I think that's the terminology
b. It's not hidden (but it doesn't show up in the shortcut inspectors)
c. In summary, you can click down to it - but its activity is hard to find
<
https://i.postimg.cc/HsCRLykg/mute01.jpg>
Note: I'm aware there are purpose-built mute-switch apps; but this is
a tutorial to write your own shortcut to any activity which is
not exported as public - so the mute is just one easy-to-run example.
Steps:
A. Locate the activity you wish to make a one-tap shortcut to
B. Find the unique package name & the unique activity name
C. Create the shortcut (name & customize it, as desired)
First we have to locate the activity & figure out the unique name
where the "normal" method fails for this unexported public activity!
a. Start any good activity inspector (which reports public activities).
<
https://m.apkpure.com/shortcut-widgets-inspector/com.cemique.shortcutwidgets>
b. Then go to the activity you wish to find the unique name of.
Settings > Sounds and vibration > Vibrate (or Mute)
c. Go back to the activity inspector to find the public activity
Drat. It's not a visibly exported public activity after all. Sigh.
Since it's not a visibly exported public activity, let's dig deeper.
(We never fail to do what we want to do on Android.)
Tutorial:
*How to make shortcut to an activity which isn't EXPORTED as public*
1. Start any good activity manager such as the Sousa "Activity Manager"
Activity Manager: Hidden activities by Andre de Sousa (free, adware)
<
https://play.google.com/store/apps/details?id=com.andrefrsousa.tools.activitymanager>
2. Make sure "Show system apps" is turned on in the Activity Manager
settings (click the three dots at the top right of the app GUI)
3. Then search for the activities in the "Settings" entry
(or scroll down to "Settings - com.android.settings")
4. Once you have "Settings com.android.settings" open,
search for "sound", which will bring up three entries
System sound (Settings$SecSoundSystemSoundSettingsActivity)
Sounds and vibration (Settings$SoundSettingsActivity)
Sounds and vibration (SoundSettings)
5. Tap on each one to test which one you are seeking
The first takes you to the sound volume slider.
The other two take you to where you want to go.
(Why do they have two activities doing the same thing?)
6. Press the three dots to the right of the middle entry
A dialog will pop up asking what you wish to do now...
Create shortcut
Launch activity with parameters
Launch activity with ROOT (note the phone is unrooted)
7. Choose "Launch activity with parameters"
*That reveals the two unique pieces of data you need!*
Package name = com.android.settings
Class name = com.android.settings.Settings$SoundSettingsActivity
Once you have those two things, it's easy to manually create a one-tap homescreen shortcut to that package/activity (aka package/class)!
*[Tutorial] Illustrated (mostly privacy based) one-tap shortcuts*
*so that you can access (in a single tap!) any buried Android setting*
*or app activity*
<
https://groups.google.com/g/comp.mobile.android/c/qb3VFw0gWGc>
But this app will create that shortcut for you, so why bother?
8. Go back and this time select "Create shortcut" instead.
This will pop up a "Sounds and vibration" shortcut-editor
9. If desired, change the icon to whatever you like
If desired, change the label of that shortcut to "Mute"
Then press "Create"
This brings up an "Add to Home screen" dialog box
Edit the icon & label as desired
Longpress on the icon to place it on your homescreen where desired.
Voila!
You now have a one-tap shortcut on your homescreen to the private
(unexported) Android system "Sounds & vibration" settings activity.
<
https://i.postimg.cc/HsCRLykg/mute01.jpg>
--
Note I'm not sure of the terminology as there are various activities
a. Activities which you can click to that show up in inspectors
b. Activities which you can click to that do not show up in inspectors
c. Activities you can not click to but which show up in inspectors
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)