-1

I am using this app that unlocks/locks your phone when you cover it, but whenever it unlocks, it opens up the app. I am trying to use automatit pro to run a shell command to go to homescreen at screen on but I don't know what command to use. And way of going to homescreen is useful.

1 Answers1

0

AutomateIt Pro already has an option to go to home screen. It is named Launch Home Screen Action and can be found under More... of Action.

Alternatively, you can use the action Start Application Action. Pick your default launcher app and that should work.

Some launcher apps won't be listed in the last action, so you can consider sending an intent. Find out the default activity for your launcher app and fill the details required in the action Launch Intent Action.


Requires root access

You can go to home using input keyevent command. It requires a keycode, which is 3 or HOME or KEYCODE_HOME for our case. (Source - by Rene Barbosa)

input keyevent 3

Another alternative is to launch the default launcher app with its default activity. Use monkey or am for that. You would need to know the package name (PACKAGE) of your default launcher for monkey and the default activity (ACTIVITY) of default launcher app for am.

Monkey

monkey -p PACKAGE 1

AM

am start -n PACKAGE/ACTIVITY
Firelord
  • 25,084
  • 20
  • 124
  • 286