Command window through the ADB shell into the android Linux command interface, enter AM-HELP see the following information:
We can launch components such as Activity,service,broadcastreceiver in Android by command.
1. Call a phone:
Am Start-a android.intent.action.call-d tel:10086
Here-a represents the action,-D describes the incoming data, and the-T represents the incoming type.
2. Open a webpage:
Am Start-a android.intent.action.view-d http://www.baidu.com (here-d means incoming data)
3. Open the music player:
Am Start-a Android.intent.action.MUSIC_PLAYER or
The package name and application name can be found in the Androidmanifest.xml file.
Am Start-n com.android.music/om.android.music.musicbrowseractivity
4. Start a service:
AM StartService < service name >
For example: AM startservice-n com.android.music/com.android.music.mediaplaybackservice (here-n indicates component)
Or am startservice-a com.smz.myservice (here-a means action, which you define in Androidmanifest)
5. Send a broadcast:
AM BROADCAST-A < broadcast action >
Example: AM broadcast-a com.smz.mybroadcast
6. You can also operate in code.
Am also has a lot of usage to be studied.
Android AM Command