如何测试BOOT_COMPLETED广播接收器在仿真器 [英] How To Test BOOT_COMPLETED Broadcast Receiver In Emulator

查看:139
本文介绍了如何测试BOOT_COMPLETED广播接收器在仿真器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要检查广播接收器与行动 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆