The ADB Shell AM command is available on the cmd command line via commands to start activity,boradcast,service, etc., and can be referenced in the following attachments.
For example, in the CMD serial port we send the broadcast, the broadcast action is "com.cmcc.media.bufferring", and with key is "url", value is "http://www.baidu.com" data to the broadcast receiver, as follows
Am Broadcast-a "com.cmcc.media.bufferring"--es "url" "http://www.baidu.com"
For example, we use the following command in the APK:
Final String broadcastcmdstr = "* * * * *";
Runtime.getruntime (). exec (BROADCASTCMDSTR);
But the APK will error:
The APK is sent when it cannot be sent successfully, as long as the APK to send broadcast increases
Android.permission.INTERACT_ACROSS_USERS and android.permission.INTERACT_ACROSS_USERS_FULL permissions.
The receiving end does not need to process
Reference:
ANDROID_ADB Shell AM/PM Use
Http://blog.sina.com.cn/s/blog_51335a0001017ux5.html
How Android apps can monitor their implementation of whether they are uninstalled or uninstalled (second edition)
Http://www.cnblogs.com/zealotrouge/p/3159772.html
Android Console Command am Introduction
http://blog.csdn.net/hudashi/article/details/7782938
ANDROID:ADB Shell am command line send Activity/service/broadcast
http://blog.csdn.net/annkie/article/details/7896559
ADB Shell AM Command