The following code is launching gps setting screen in samsung device but in htc device it is launching security screen of setting.How can i write code so that it will launch
Get rid of the setComponent()
and addCategory()
calls and see if that helps. You should not be using those in any case, particularly the ComponentName
that hard-wires in invalid package and class names.
I think this code is helpful for you
Intent intent1 = new Intent();
intent1.setClassName("com.android.settings",
"com.android.settings.SecuritySettings");
context.startActivity(intent1);