简体   繁体   English

广播接收器未捕获传入消息

[英]Broadcast Receiver not capturing incoming message

I am creating an Android application which is capturing the incoming messages and saving them into a local database.我正在创建一个 Android 应用程序,它捕获传入的消息并将它们保存到本地数据库中。 All functionality is working fine if I test the app on a Nokia 8.1 or (Pure Android, Stock Android OS).如果我在诺基亚 8.1 或(纯 Android、Stock Android 操作系统)上测试该应用程序,则所有功能都可以正常工作。 In the case of Custom ROM phones like MI(xiaomi), OPPO, VIVO.对于自定义 ROM 手机,如 MI(小米)、OPPO、VIVO。 The Receiver is not receiving the incoming message if the app is running in the background.如果应用程序在后台运行,接收器将不会收到传入消息。 It's working fine if the app is in the foreground.如果应用程序在前台,它工作正常。 Any suggestions would be very helpful for me.任何建议都会对我很有帮助。 Thanks谢谢

I want to receive all incoming messages on every OS (Stock or Custom)我想在每个操作系统(库存或自定义)上接收所有传入消息

其实我忘了在运行时添加读取中小企业权限

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM