Android am command and hotkey file compilation,
1. CALL am start-a android. intent. action. CALL-d tel: 10086
Here,-a indicates the action,-d indicates the input data, and-t indicates the input type.
2. Open a webpage: am start-a android. intent. action. VIEW-d http://www.baidu.com (here-d indicates the incoming data)
3. start an activity: am start-n com. hysmarthotel. movie/com. hysmarthotel. movie. MainActivity
4: Start a service: am startservice-n com. android. music/com. android. music. MediaPlaybackService (here-n indicates the component)
5: Send a broadcast: am broadcast-a com. smz. mybroadcast am broadcast-a <broadcast action>
In addition, the am command can be written into the android system and saved to system/etc/hotkey. xml,
The hotkey. xml format is as follows:
<? Xml version = "1.0" encoding = "UTF-8"?>
<Hotkey>
<Event
Code = "00b7"
Cmd = "am start-n com. amlogic. tvplay/com. amlogic. tvplay. MainActivity"/>
<Event
Code = "00b8"
Cmd = "am start-n com. hysmarthotel. movie/com. hysmarthotel. movie. MainActivity"/>
<Event
Code = "003f"
Cmd = "am start-n sdmc. hotel. remote/sdmc. hotel. remote. KeXinListView"/>
</Hotkey>
Event indicates the key-value pair, and code indicates the code value of your remote control (hexadecimal). cmd indicates the broadcast or activity to be sent.
When you configure the hotkey, press the relevant key on the android Application layer, and the system will execute the related commands in the hotkey.