Android AM命令行启动程序的方法
来源:互联网 发布:清华软件学院排名 编辑:程序博客网 时间:2024/06/05 23:03
am start -n com.android.settings/com.android.settings.Settings &
am start -n com.android.settings/com.android.settings.SoundAndDisplaySettings &
am start -n com.android.music/com.android.music.MediaPlaybackActivity -d file:///a.ogg &
其实就是去文件packages/apps/Settings/AndroidManifest.xml中观看
package="com.android.settings"
然后所有activity的名字都可以使用上面的am start -n启动了
am start -n package/package.Activityname -d Uri &
手机可以adb shell && am --help 查看更加详细的语法
拨电话号码
am start -a android.intent.action.DIAL -d tel:0800000123 &
直接打该号码(需要将packages/apps/Phone/AndroidManifest.xml中含有
"android.intent.action.CALL"的所在activity即"OutgoingCallBroadcaster"
包含的android:permission="android.permission.CALL_PHONE"去掉才行
)
am start -a android.intent.action.CALL -d tel:0800000123 &
上网
am start -a android.intent.action.VIEW -d http://www.baidu.com &
发邮件
am start -a android.intent.action.SENDTO -d mailto:gliethttp@123.com &
显示地图
am start -a android.intent.action.SENDTO -d "geo:38.899533,-77.036476" &
am start -a android.intent.action.VIEW -d file:///a.ogg -t audio/* &
am start -a android.intent.action.VIEW -d file:///sdcard/chujia.mp3 -t audio/* &
am start -a android.intent.action.VIEW -d file:///b.mp4 -t video/* &
am start -a android.intent.action.VIEW -d file:///c.jpg -t image/* &
am start -D -d file:///chujia.mp3 -t audio/* &
am start -a android.intent.action.SEARCH -d file:///chujia.mp3 -t audio/* &
这里的am -a参数表示执行一个action动作,后面的audio/*表示数据mime类型,
Android将自动查找mime类型对应的所有文件中和-d指定一致的文件,
同样mime类型具体数值可以去文件packages/apps/Music/AndroidManifest.xml中观看
am start -n com.android.settings/com.android.settings.SoundAndDisplaySettings &
am start -n com.android.music/com.android.music.MediaPlaybackActivity -d file:///a.ogg &
其实就是去文件packages/apps/Settings/AndroidManifest.xml中观看
package="com.android.settings"
然后所有activity的名字都可以使用上面的am start -n启动了
am start -n package/package.Activityname -d Uri &
手机可以adb shell && am --help 查看更加详细的语法
拨电话号码
am start -a android.intent.action.DIAL -d tel:0800000123 &
直接打该号码(需要将packages/apps/Phone/AndroidManifest.xml中含有
"android.intent.action.CALL"的所在activity即"OutgoingCallBroadcaster"
包含的android:permission="android.permission.CALL_PHONE"去掉才行
)
am start -a android.intent.action.CALL -d tel:0800000123 &
上网
am start -a android.intent.action.VIEW -d http://www.baidu.com &
发邮件
am start -a android.intent.action.SENDTO -d mailto:gliethttp@123.com &
显示地图
am start -a android.intent.action.SENDTO -d "geo:38.899533,-77.036476" &
am start -a android.intent.action.VIEW -d file:///a.ogg -t audio/* &
am start -a android.intent.action.VIEW -d file:///sdcard/chujia.mp3 -t audio/* &
am start -a android.intent.action.VIEW -d file:///b.mp4 -t video/* &
am start -a android.intent.action.VIEW -d file:///c.jpg -t image/* &
am start -D -d file:///chujia.mp3 -t audio/* &
am start -a android.intent.action.SEARCH -d file:///chujia.mp3 -t audio/* &
这里的am -a参数表示执行一个action动作,后面的audio/*表示数据mime类型,
Android将自动查找mime类型对应的所有文件中和-d指定一致的文件,
同样mime类型具体数值可以去文件packages/apps/Music/AndroidManifest.xml中观看
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行启动程序的方法
- Android AM命令行安装和启动程序的方法
- AM 命令行启动程序的方法
- Android命令行启动程序-am命令的使用
- Android命令行启动程序-am命令的使用
- Android命令行启动程序-am命令的使用-纠正网上大部分资料的错误
- Android命令行启动程序-am命令的使用-纠正网上大部分资料的错误
- 在Android命令行启动程序的方法
- hdu 1237 简单计算器
- JAVA 网络编程(TCP传输1)
- 开源 免费 java CMS - FreeCMS1.2-标签 questionList
- [数据挖掘]关联规则挖掘
- 关于自学和找工作的权重
- Android AM命令行启动程序的方法
- DCMTK开源库的学习笔记1:将DCM文件保存成BMP文件或数据流(即数组)
- JAVA Integer的一点注意事项
- 实现自定义checkbox listview的方法
- 坐标
- TCP/IP-复习笔记(1)UDP
- javax.el.PropertyNotFoundException: Property 'xxx' not found on type
- 检查apache服务器是否正在运行的脚本
- SQL----多张表连接查询,只查出符合条件的数据