I am new to cordova.I want to know how to open phone settings using cordova? I found this
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
But don't understand where to put this.
I am new to cordova.I want to know how to open phone settings using cordova? I found this
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
But don't understand where to put this.
You are not able to open the Device Settings from inside an application on your own or with your own dialog.
Prior to iOS 5.1 it was possible to open up specific settings with the prefs:
link as you can see in a long answer here -> iOS Settings PREFS
Open up the settings is only possible through a real device dialog like deactivated location services or disabling air-plane mode or sth. like that. Since iOS 8 it is possible to open up the settings application. More information can be found here -> Opening Settings Dialog
What i mean with my comment is that if you use that code it will only work for Android OS devices.
As @Sithys said for iOS or other plateforms you would need some other kind of call.
If you still want to make this work with Android check https://stackoverflow.com/a/27785992/665823 . As far a i know to make this kind of call you need to create a JavaScript Interface so maybe this tutorial can help you http://devgirl.org/2013/07/17/tutorial-how-to-write-a-phonegap-plugin-for-android/