Android opening application settings not working on Android 4.1.1 -
i have used following code opening application settings code , worked fine on samsung galaxy tab.
private void showsettingsforpackage(string packagename) { intent intent = new intent(); final int apilevel = build.version.sdk_int; if (apilevel >= 9) { // above 2.3 intent.setaction(settings.action_application_details_settings); uri uri = uri.fromparts("package", packagename, null); intent.setdata(uri); } else { // below 2.3 string apppkgname = (apilevel == 8 ? "pkg" : "com.android.settings.applicationpkgname"); intent.setaction(intent.action_view); intent.setclassname(app_details_package_name, app_details_class_name); intent.putextra(apppkgname, packagename); } this.startactivity(intent); }
my problem above code not opening settings in htc 1 x+ android 4.1.1. please let me know there solution?
thanks , regards @nish