0

Some apps are able to put a shortcut icon to the homescreen for one of their inner screens.

  1. How can I detect what link that shortcut is pointing to?
  2. And is it possible to add custom shortcuts with different icons?
0

1 Answer 1

0

How can I detect what link that shortcut is pointing to?

If you've root access then browse to the data directory of the default launcher. Browse through its files and use trial and error to figure out where home screen shortcuts are stored by the launcher app. For instance, in Nova Launcher home screen shortcuts are saved in a database named launcher.db. This file has a table named favorites which contains the information about the shortcuts including the intents needed to run an app (or a specific activity/target in it).

Once you've found the file holding the information you can look into it to see what intent it is using for the shortcut.

And is it possible to add custom shortcuts with different icons?

Yes, it is easy. There might be apps in the Play Store to let you create shortcut for anything. However, I only know of Tasker automation app though. In it you can setup a Task which should contain the logic and actions that should be executed once the user (yourself) tap on the shortcut on the home screen. After setting up the Task, go to your home screen, figure out how to add widgets on it, choose Tasker 1x1 widget, and choose the recently created Task in the list shown to you.

As for using a custom icon, there are two ways to go about this. Either select a custom icon when creating the Task and that icon would be used as the shortcut icon. Alternatively, use a home launcher which allows changing icons for shortcuts (Nova Launcher allows that).

3
  • Thanks. Are there any other solutions for non-rooted devices? e.g. Samsung? Jan 8, 2023 at 5:46
  • 1
    @AhmadBehzadi perhaps the alternative is by getting the APK file (through any methods) and inspecting the Android Manifest file.
    – Andrew T.
    Jan 8, 2023 at 6:27
  • 1
    @AhmadBehzadi you can try the approach suggested by Andrew T. To figure out the activity or the target embedded in the shortcut you can also use logcat to see what intent is launched when the user taps on the shortcut. This does not require root access. None of these approaches are user-friendly though.
    – Firelord
    Jan 8, 2023 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .