如何测试BOOT_COMPLETED广播接收器在仿真器 [英] How To Test BOOT_COMPLETED Broadcast Receiver In Emulator
问题描述
我要检查广播接收器
与行动 BOOT_COMPLETED
在模拟器
。
有没有什么办法来检查模拟器广播接收器?我怎样才能重新启动仿真器来查看对方?有没有直接的命令?
Is there any way to check that broadcast receiver in emulator ? How can i restart emulator to check that receiver ? is there any direct command?
在此先感谢。
推荐答案
有一个在模拟器类似的设备没有电源按钮有,所以
There is no Power Button in Emulator like Devices have,So
要停止模拟器实例,只需关闭模拟器窗口。的
和启动/重新启动
是在Eclipse的AVD管理开始和您的BroadcastReceiver与BOOT_COMPLETE行动将获得一定叫的
And To Start/Restart
it Start from AVD Manager of Eclipse and Your BroadcastReceiver with BOOT_COMPLETE action will get called for sure
您可以启动AVD另辟蹊径此外,从 CMD
的去AndroidSDK的工具的,并给这条命令 E: \ Android的SDK-WINDOWS \工具>仿真-avd AVDNAMEHERE
You can start AVD another way also, From CMD
go to Tools of AndroidSDK and give this commmand E:\android-sdk-windows\tools>emulator -avd AVDNAMEHERE
要发送广播从CMD :您可以使用此命令。
To Send Broadcast from CMD you can use this Command.
亚行壳AM广播-a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n程序包/将class_name
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n package_name/class_name
了解更多关于Android模拟器: Android模拟器和的使用仿真器
Read more about Android Emulator : Android Emulator and Using Emulator
这篇关于如何测试BOOT_COMPLETED广播接收器在仿真器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!