2021-05-23 15:49:42 +01:00
|
|
|
# am
|
|
|
|
|
|
|
|
> Android 活动管理器。
|
2021-08-02 09:41:09 +01:00
|
|
|
> 更多信息见: <https://developer.android.com/studio/command-line/adb#am>.
|
2021-05-23 15:49:42 +01:00
|
|
|
|
|
|
|
- 启动一个指定的活动:
|
|
|
|
|
|
|
|
`am start -n {{com.android.settings/.Settings}}`
|
|
|
|
|
|
|
|
- 启动一个活动并将数据传递给它:
|
|
|
|
|
|
|
|
`am start -a {{android.intent.action.VIEW}} -d {{tel:123}}`
|
|
|
|
|
|
|
|
- 启动与特定操作和类别匹配的活动:
|
|
|
|
|
|
|
|
`am start -a {{android.intent.action.MAIN}} -c {{android.intent.category.HOME}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将意图转换为 URI:
|
2021-05-23 15:49:42 +01:00
|
|
|
|
|
|
|
`am to-uri -a {{android.intent.action.VIEW}} -d {{tel:123}}`
|