My application should open the "Mobile Network Settings" action. Everything works fine, except for devices with Android 4.1 that crash after trying to open Settings
Intent intent = new Intent(android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS);
final ComponentName cName = new ComponentName("com.android.phone", "com.android.phone.Settings");
intent.setComponent(cName);
startActivity(intent);
Stack trace after crash:
java.lang.SecurityException: Permission Denial: starting Intent { act=android.settings.DATA_ROAMING_SETTINGS cmp=com.android.phone/.Settings } from ProcessRecord{41b83198 ...
Any ideas? Could this be due to a manifest?
UPDATE:
Looks like the problem was solved here:
Android - Mobile Network Settings Menu (Jelly Bean)
The point is to change "com.android.phone.Settings" to "com.android.phone.MobileNetworkSettings"
source
share