I am trying to listen for status of gsm enabled (activated) on device.
I looked over Settings, but did not find something which match this (there is wifi enabled but not gsm/data enabled).
Is there any way to listen for gsm activate event ?
I have tried the following but is does not catch "data enabled" events:
ContentResolver contentResolver = context.getContentResolver();
Uri setting = Settings.System.getUriFor("mobile_data");
ContentObserver observer = new ContentObserver(new Handler()) {
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
}
@Override
public boolean deliverSelfNotifications() {
return true;
}
};
EDIT:
I need to see if gsm is enabled ( NOT the same as data connectivity). GSM can be enabled (by user) and at the same time there might be no connectivity (if device is far from stations for example).
Thank you, Ran