Android: How to create a receiver that listen any changes of system settings?

I'm trying to create a BroadCast receiver that listen any changes of system settings to update a UI.

I wrote a series of action in 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 every single system settings change (like "auto rotation" from on to off or vice versa, brightness from auto to off or anything else and the others).

If there is an action that I can write in the manifest is better for me.

Many thanks

Answers


but I need to listen every single system settings change (like "auto rotation" from on to off or vice versa, brightness from auto to off or anything else and the others).

Most do not have broadcast Intents associated with them, sorry.


There is indeed a way to do this but it's not with a broadcast receiver. You need to use an observer. I do this in Audio Control and it works almost perfect. Once in a while something will be changed that I don't pick up but that is rare. Here is a link that gives some details on how to implement.

Settings Observer


Need Your Help

Adsense + Android games downloads website

android adsense

Me and my friend have android games downloads website. We don't add paid apps, apps with mods and etc. Just original android games (free). Other android developers also add their games to our websi...

obfuscate: Make file-min.js?

javascript obfuscation

For example, when I download Jquery, I see there is always 2 file: jquery.js and jquery-min.js.