从RAM中清除应用程序后,广播接收器无法正常工作 [英] Broadcast receiver not working when app is cleared from RAM

查看:93
本文介绍了从RAM中清除应用程序后,广播接收器无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Android新手.我正在制作一个闹钟.在用户从RAM中清除应用程序之前,它的运行情况非常理想.搜索时,我发现如果从RAM中清除了该应用程序,则广播接收器将无法正常工作.那么,我该怎么办呢?通过服务发送广播会有所帮助吗?另外,如果您有指向android服务的良好教程的链接,请共享.还请告诉我是否还有其他方法可以解决我的问题.

I am new to android. I am making an alarm clock. Its working perfectly until the user clears the app from the RAM. On searching, I found that broadcast receivers don't work if the app is cleared from the RAM. So, what exactly should I do? Will sending the broadcast from a service help? Also if you have a link to a good tutorial to Services in android, pls do share. Also let me know if there is some other way to solve my problem.

推荐答案

Xiaomi 设备中,您只需将应用添加到自动启动列表中,请按照以下简单步骤操作:

In Xiaomi devices, you just have to add your app to Autostart list, to do so, follow these simple steps given below:

  • 在手机上打开安全应用.

点击权限,它将显示两个选项:自动启动和 权限

Tap on Permissions, it'll show you two options: Autostart and Permissions

点击自动启动,它将显示具有打开或关闭切换的应用程序列表 按钮.

Tap on Autostart, it'll show you list of apps with on or off toggle buttons.

打开应用程序的切换按钮,就完成了!

Turn on toggle of your app, you're done!

这篇关于从RAM中清除应用程序后,广播接收器无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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