简体   繁体   中英

On Incoming Call when app is in background or app is not running the broadcast receiver is not called in Lenovo L18021(A5)

I am developing a custom dailer App incoming call screen but my problem is that when the app is in foreground, on incoming call the broadcast receiver is called and displays the custom screen but when the app is in the background or not in running state then the broadcast receiver is not called. How to resolve this?

And Also Getting this Log

ConnectionTracker: Exception thrown while unbinding java.lang.IllegalArgumentException: Service not registered: lt@3e5af9d

On some devices (notably low-end and Chinese manufacture) apps are not permitted to perform background activities if they are not in a list of "protected apps". This is done to save battery life. If your device does this, it will not launch a BroadcastReceiver if the app is not already running. To fix this you will need to manually add your app to the list of "protected apps" or "apps allowed to perform background activities". There is a setting in the Android settings for the user to maintain this list of apps. It is usually in the "Security" or "Power management" settings somewhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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