Reputation: 1357
I have been trying to find a way to navigate to navigate from an Application to the Settings preferences for the Application.
I have tried the following, yet unfortunately it does error.
var root = new UINavigationController (); root.PushViewController (new Uri ("prefs:root=General"), true);
When trying this, I did believe it would error as it should be used to Navigate to an already made view.
Is there anyway I am able to navigate to the settings application as required via the use of Xamarin C#?
Thanks.
Upvotes: 4
Views: 3941
Reputation: 31
The following code is working in iPhone.
var url = new NSUrl("prefs:root=Settings");
UIApplication.SharedApplication.OpenUrl(url);
Upvotes: 1
Reputation: 1148
Sorry, you can't. Apple disabled the ability to do this in iOS 5.1.
The only option is creating your own preferences UI and displaying that instead.
Edit: as of iOS 8, you can take the user direct to your app's preferences:
UIApplication.SharedApplication.OpenUrl(new NSUrl(UIApplication.OpenSettingsUrlString))
Upvotes: 9