Files
tldr/pages.zh/android/am.md
2022-03-27 02:25:15 -03:00

21 lines
531 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# am
> Android 活动管理器。
> 更多信息:<https://developer.android.com/studio/command-line/adb#am>.
- 启动一个指定的活动:
`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}}`
- 将意图转换为 URI
`am to-uri -a {{android.intent.action.VIEW}} -d {{tel:123}}`