通过adb shell发送广播通知

am broadcast

adb shell am broadcast 后面的参数有:

[-a ]
[-d ]
[-t ]
[-c [-c ] …]
[-e|–es …]
[–ez …]
[-e|–ei …]
[-n ]
[-f ] []

例如:

adb shell am broadcast -a com.android.test –es test_string "this is test string"
//String类型

adb shell am broadcast -a com.android.test –ei test_int 100
//int类型

adb shell am broadcast -a com.android.test –ez test_boolean true
//boolean类型

你可能感兴趣的:(Android)