I know this thread is a bit old. But I am in need of the same. I have written my own Android service class and I do not wish to poll for settings changes - I really want callbacks or some other notification mechanism.
I having read the above material above as well as several other postings and the code shown
here, I remain confused and unsuccessful in getting any callbacks.
I am following the lead of using reflection in my SystemPropertiesProxy class to get at the SystemProperties class and to invoke its addChangeCallback() method handing it my Runnable (that only logs a line right now). I have tried to issue
obj.transact(SYSPROPS_TRANSACTION, data, null, 0);
as suggested but maybe I am doing something wrong. I have tried using a Binder within my own service as the obj. I have tried following the lead in the fore-mentioned link and iterated over all of the services from the ServiceManager and using each of them as the obj. None of this seems to work.
I know that some of the gsm.* system properties get changed when I toggle airplane mode on my device. So I am expecting to get at least one callback when airplane mode is toggled on/off. Yet, I have not managed it.
So is a more complete answer available?