一. Service的用法
1.使用service的phone来打电话
service call phone 2 s16 10086
挂电话
service call phone 5
2.使用service的phone来发短信
service call isms 5 s16 "13814869354" s16 "" s16 "hello world!" s16 "" s16 ""
二. AM的用法
# am start -n {包(package)名}/{包名}.{活动(activity)名称}
由此计算器(calculator)的启动方法为:
# am start -n com.android.calculator2/com.android.calculator2.Calculator
calendar(日历)的启动方法为:
# am start -n com.android.calendar/com.android.calendar.LaunchActivity
AlarmClock(闹钟)的启动方法为:
# am start -n com.android.alarmclock/com.android.alarmclock.AlarmClock
Music 和 Video(音乐和视频)的启动方法为:
# am start -a android.intent.action.VIEW -d file:///sdcard/3.mp3 -t audio/*
# am start -n com.android.music/com.android.music.MediaPlaybackActivity -d file:///sdcard/3.mp3
# am start -a android.intent.action.VIEW -d file:///b.mp4 -t video/* &
# am start -n com.android.music/com.android.music.VideoBrowserActivity
# am start -n com.android.music/com.android.music.MediaPlaybackActivity
Camera(照相机)的启动方法为:
# am start -n com.android.camera/com.android.camera.Camera
Browser(浏览器)的启动方法为:
# am start -n com.android.browser/com.android.browser.BrowserActivity
am start -n com.android.browser/com.android.browser.CombinedBookmarkHistoryActivity
am start -n com.android.phone/com.android.phone.NetworkSetting
am start -n com.android.settings/com.android.settings.WirelessSettings
am start -n com.android.mms/com.transaction.SmsReceiverService
am start -a android.bluetooth.intent.action.BLUETOOTH_STATE_CHANGED
CALL_ACTION 动作:拨打电话,被呼叫的联系人在数据中指定。
DIAL_ACTION 动作:拨打数据中指定的电话号码。