Android am command

Source: Internet
Author: User

In Android, you can use the am command to start a specified activity. During work, screen coordinate calibration is required for newly developed machines. Since the machine has not been properly debugged, it does not appear in every coordinate calibration and cannot be used, you can only start the activity by calling the coordinate calibration through the terminal.

 

For example, start the main activity of coordinate.apk.

Am start-N com. apical. apicalcoordinate/COM. apical. apicalcoordinate. coordinateactivity

Com. apical. apicalcoordinate is the package name of the application activity.

 

Usage: am [subcommand] [Options]

Start an activity: am start [-D] <intent>
-D: Enable debugging

Send a broadcast intent: AM broadcast <intent>

Start an instrumentation: am instrument [flags] <component>
-R: Print raw results (otherwise decode report_key_streamresult)
-E <Name> <value>: Set argument <Name> to <value>
-P <File>: Write profiling data to <File>
-W: Wait for instrumentation to finish before returning

Start profiling: am profile <process> Start <File>
Stop profiling: am profile <process> stop

<Intent> specifications include these flags:
[-A <action>] [-D ] [-T <mime_type>]
[-C <Category> [-C <Category>]...]
[-E | -- es <extra_key> <extra_string_value>...]
[-- EZ <extra_key> <extra_boolean_value>...]
[-E | -- EI <extra_key> <extra_int_value>...]
[-N <component>] [-F <flags>] [<URI>]

The start method is

# Am start-N package name/package name. Activity name

The startup method can be obtained from the androidmanifest. xml file of each application.

 

The startup methods of music and video are as follows:

# Am start-N com. Android. Music/COM. Android. Music. musicbrowseractivity

# Am start-N com. Android. Music/COM. Android. Music. videobrowseractivity

# Am start-N com. Android. Music/COM. Android. Music. mediaplaybackactivity

 

The start method of camera (CAMERA) is as follows:

# Am start-N com. Android. Camera/COM. Android. Camera. Camera

 

Browser is started as follows:

# Am start-N com. Android. Browser/COM. Android. browser. browseractivity

 

Start the browser:

Am start-A Android. Intent. Action. View-D http://www.google.cn/

 

Call number:

Am start-A Android. Intent. Action. Call-D Tel: 10086

 

Start Google map to go directly to Beijing:

am start-A Android. Intent. Action. View GEO: 0, 0? Q = Beijing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.