Android O : PHONE_STATE broadcast limitation

Eventually, the action was added to the “Implicit Broadcast Exceptions” list so you can add ACTION_PHONE_STATE_CHANGED to your manifest and it will work: https://developer.android.com/guide/components/broadcast-exceptions ACTION_CARRIER_CONFIG_CHANGED, TelephonyIntents.ACTION_*_SUBSCRIPTION_CHANGED, “TelephonyIntents.SECRET_CODE_ACTION”, ACTION_PHONE_STATE_CHANGED, ACTION_PHONE_ACCOUNT_REGISTERED, ACTION_PHONE_ACCOUNT_UNREGISTERED OEM telephony apps may need to receive these broadcasts.

Fatal Exception: android.app.RemoteServiceException: can’t deliver broadcast at android.os.Handler.dispatchMessage

I was facing the same issue with my app, what I do is use LocalBroadcastManager instead of context. Android documents also suggest using LocalBroadcastManager for sending in-app broadcast receivers. //register your receiver like this LocalBroadcastManager.getInstance(this).registerReceiver(mMessageReceiver, new IntentFilter(“custom-event-name”)); // unregister like this LocalBroadcastManager.getInstance(this).unregisterReceiver(mMessageReceiver); // broadcastlike this LocalBroadcastManager.getInstance(this).sendBroadcast(intent); Hope this will help. Thanks! 🙂

CONNECTIVITY_ACTION intent received twice when Wifi connected

NOTE: For a recent, up-to-date answer, see this one below! After a lot of googling and debugging, I believe this is the correct way to determine if Wifi has connected or disconnected. The onReceive() method in the BroadcastReceiver: public void onReceive(final Context context, final Intent intent) { if(intent.getAction().equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { NetworkInfo networkInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); if(networkInfo.isConnected()) { … Read more

Broadcast Receiver Not Working After Device Reboot in Android

Here’s a tested and working solution on both the devices that you mentioned, OnePlus and Mi. As you said the auto-start prevention feature on OnePlus and Mi devices prevent apps from starting up their services automatically on boot complete so as to improve the overall device boot speed and battery performance. However, there’s a workaround … Read more

android – “Exported receiver does not require permission” on receivers meant to receive from system services

Why don’t I get the warning on all receivers ? Because the first two are clearly designed to be broadcast by Android. The last one is unknown, partly because you did not supply the string resource values, and possibly because they are your own unique action strings. What permissions do I need to set for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)