Android.Locations.SettingInjectorService.OnGetEnabled Method
Returns the Android.Preferences.Preference.Enabled value.

Syntax

[Android.Runtime.Register("onGetEnabled", "()Z", "GetOnGetEnabledHandler")]
protected abstract bool OnGetEnabled ()

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the Android.Preferences.Preference.Enabled value. Should not perform unpredictably-long operations such as network access--see the running-time comments in the class-level javadoc.

Note that to prevent churn in the settings list, there is no support for dynamically choosing to hide a setting. Instead you should have this method return false, which will disable the setting and its link to your setting activity. One reason why you might choose to do this is if NoType:android/provider/Settings$Secure;Href=../../../reference/android/provider/Settings.Secure.html#LOCATION_MODE is NoType:android/provider/Settings$Secure;Href=../../../reference/android/provider/Settings.Secure.html#LOCATION_MODE_OFF.

It is possible that the user may click on the setting before this method returns, so your settings activity must handle the case where it is invoked even though the setting is disabled. The simplest approach may be to simply call Android.App.Activity.Finish when disabled.

[Android Documentation]

Requirements

Namespace: Android.Locations
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0