Android.Content.ContextWrapper.GetSystemService Method
Return the handle to a system-level service by name.

Syntax

[Android.Runtime.Register("getSystemService", "(Ljava/lang/String;)Ljava/lang/Object;", "GetGetSystemService_Ljava_lang_String_Handler")]
public override Java.Lang.Object GetSystemService (string name)

Parameters

name
The name of the desired service.

Returns

Documentation for this section has not yet been entered.

Remarks

Return the handle to a system-level service by name. The class of the returned object varies by the requested name. Currently available names are:

Context.WindowService ("window")
The top-level window manager in which you can place custom windows. The returned object is a Android.Views.IWindowManager.
Context.LayoutInflaterService ("layout_inflater")
A Android.Views.LayoutInflater for inflating layout resources in this context.
Context.ActivityService ("activity")
A Android.App.ActivityManager for interacting with the global activity state of the system.
Context.PowerService ("power")
A Android.OS.PowerManager for controlling power management.
Context.AlarmService ("alarm")
A Android.App.AlarmManager for receiving intents at the time of your choosing.
Context.NotificationService ("notification")
A Android.App.NotificationManager for informing the user of background events.
Context.KeyguardService ("keyguard")
A Android.App.KeyguardManager for controlling keyguard.
Context.LocationService ("location")
A Android.Locations.LocationManager for controlling location (e.g., GPS) updates.
Context.SearchService ("search")
A Android.App.SearchManager for handling search.
Context.VibratorService ("vibrator")
A Android.OS.Vibrator for interacting with the vibrator hardware.
Context.ConnectivityService ("connection")
A Android.Net.ConnectivityManager for handling management of network connections.
Context.WifiService ("wifi")
A Android.Net.Wifi.WifiManager for management of Wi-Fi connectivity.
Context.WifiP2pService ("wifip2p")
A Android.Net.Wifi.P2p.WifiP2pManager for management of Wi-Fi Direct connectivity.
Context.InputMethodService ("input_method")
An Android.Views.InputMethods.InputMethodManager for management of input methods.
Context.UiModeService ("uimode")
An Android.App.UiModeManager for controlling UI modes.
Context.DownloadService ("download")
A Android.App.DownloadManager for requesting HTTP downloads
Context.BatteryService ("batterymanager")
A Android.OS.BatteryManager for managing battery state
Context.JobSchedulerService ("taskmanager")
A Android.App.Job.JobScheduler for managing scheduled tasks

Note: System services obtained via this API may be closely associated with the Context in which they are obtained from. In general, do not share the service objects between various different contexts (Activities, Applications, Services, Providers, etc.)

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1