diff --git a/Tasker-and-ADB-commands.md b/Tasker-and-ADB-commands.md index f83445c..7693455 100644 --- a/Tasker-and-ADB-commands.md +++ b/Tasker-and-ADB-commands.md @@ -40,6 +40,26 @@ The following commands are available: * `add_widget::[position]` * `remove_widget:` +Also, you can use the command interface to launch applications. Use a command in the following format: + +``` +cn:package.name/Activity.Name:PROFILE_ID +``` + +For example, to open the Settings app on the phone using ADB, execute the following console command: + +``` +adb shell am broadcast -a ru.execbit.aiolauncher.COMMAND --es cmd cn:com.android.settings/com.android.settings.MainSettings:0 +``` + +The same command for Tasker: + +``` +cmd:cn:com.android.settings/com.android.settings.MainSettings:0 +``` + +As you can see, 0 is the ID of the primary user. To get the package name and activity name of the desired app, you can use an app like Shortcut Maker. + To prevent third-party (malicious) applications from gaining the ability to control the launcher and write text to the widget, you can set a password to access the launcher. This password must be specified each time a command or text is sent: ```