I am trying to create a BroadCast receiver that listens for any changes to system settings to update the user interface.
I wrote a series of actions in the intent filter on my Android manifest in this way:
<receiver android:name=".Receiver_OnSettingChange">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.intent.action.AIRPLANE_MODE" />
<action android:name="android.media.RINGER_MODE_CHANGED" />
<action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
<action android:name="android.intent.action.BATTERY_CHANGED" />
<action android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
<action android:name="android.net.conn.BACKGROUND_DATA_SETTING_CHANGED" />
<action android:name="com.android.internal.telephony.MOBILE_DATA_CHANGED" />
<action android:name="com.android.settings.GPS_STATUS_CHANGED" />
<action android:name="android.nfc.action.ADAPTER_STATE_CHANGE" />
<action android:name="android.location.PROVIDERS_CHANGED" />
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="com.android.sync.SYNC_CONN_STATUS_CHANGED" />
<action android:name="android.intent.action.MEDIA_SCANNER_FINISHED" />
<action android:name="android.intent.action.MEDIA_SCANNER_STARTED" />
<action android:name="android.intent.action.MEDIA_UNMOUNTED" />
<action android:name="android.intent.action.MEDIA_EJECT" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
</intent-filter>
</receiver>
but I need to listen to all changes in system settings (for example, "automatic rotation" from on to off or vice versa, brightness from automatic to off or something else).
If there is an action that I can write in the manifest, it’s better for me.
Many thanks
source
share