重启接收器不小蜜手机工作 [英] Reboot receiver is not working in xiaomi phones

查看:104
本文介绍了重启接收器不小蜜手机工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我们在哪里,我们使用的是重启接收器中,我开始几个服务我在哪里performaning一些网络运行Android应用程序的工作。

Hi We are working on an android application where we are using reboot receiver in which I am starting few services where I am performaning some network operation.

我想通了,在像小米等重启接收器的一些Android设备不工作。

I figured it out that in some android devices like xiaomi etc reboot receiver is not working.

此前我知道,在HTC的设备也不会工作,所以我增加了一个意图过滤器给它<作用机器人:名字=android.intent.action.QUICKBOOT_POWERON/&GT ; 然后它开始工作的罚款。现在其他的手机一样小蜜它仍然没有工作。

Earlier I got to know that In HTC devices also it does not work so I added one more intent filter to it <action android:name="android.intent.action.QUICKBOOT_POWERON" /> then it started working fine. Now other phones like xiaomi it's still not working.

我必须设置附加因此它可以在所有设备精而不要求用户手动更新任何设置。

What I have to set additionally so it works fine in all the devices without asking user to update any settings manually.

<receiver
    android:name="com.xyz.broadcastreceiver.ServiceStarter"
    android:exported="true" >
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
        <action android:name="android.intent.action.QUICKBOOT_POWERON" />
    </intent-filter>
</receiver>

先谢谢了。

推荐答案

在您的清单文件的意图过滤器添加此

Add this in your manifest file in intent-filter

<action android:name="android.intent.action.BOOT_COMPLETED" />

这篇关于重启接收器不小蜜手机工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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