没有办法知道,如果设备从FASTBOOT启动?没有办法、设备、FASTBOOT

2023-09-04 05:01:55 作者:孤我为王

自从HTC开始使用Fastboot方法的设置,应用程序依赖于

Ever since HTC started using Fastboot settings, apps depending on

android.intent.action.BOOT_COMPLETED

奋斗启动以及关于HTC设备的设备开机。我有一个类似的应用程序,它依赖于上述意图动作。但由于HTC做它的关闭电源功能和对不同使用FASTBOOT(用其他条款 - 休眠)我的应用程序永远不会正常工作。 我尝试使用 ACTION_USER_ preSENT 并 ACTION_SCREEN_ON ,但它似乎比修复更劈我的问题。 你们当中有没有遇到同样的问题,并找到了一个更好的方式来处理呢?请帮忙。 SKU

struggle to boot along with the device boot on HTC devices. I have a similar application which depends on the above intent action. But since HTC does its power off and power on differently by using fastboot(other term used - Hibernation) my App never get to work normally. I tried using ACTION_USER_PRESENT and ACTION_SCREEN_ON, but it seemed to be more of hack than a fix for my problem. Do any of you came across same kind of problem and found a better way to deal with it? Please help. SKU

推荐答案

我发现,HTC在Fastboot方法电源开启和关闭电源使用意图的行动。我认为它分享在这里,因为它可能是为别人谁正面临着同样的问题,因为我是有用的。

I found the intent action that HTC uses during Fastboot Power On and Power Off. I thought of sharing it here as it may be useful for someone else who is facing same problem as me.

下面是你需要在你的接收机在AndroidManifest.xml中注册的意图行动。

Here is the intent action you need to register in AndroidManifest.xml under your Receiver.

<receiver android:name="com.my.app.MyReceiver">
     <intent-filter>
         <action android:name="android.intent.action.BOOT_COMPLETED"/>
         <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
     </intent-filter>
</receiver>

希望这是有帮助的。

Hope it was helpful