最終更新:2017-03-28 (火) 14:44:08 (1550d)  

Context.getSystemService
Top / Context.getSystemService

public abstract Object getSystemService (String name)

https://developer.android.com/reference/android/content/Context.html#getSystemService(java.lang.String)

引数

  • 定数説明取得できるクラス
    ACCESSIBILITY_SERVICEaccessibilityandroid.view.accessibility.AccessibilityManager?
    ACCOUNT_SERVICEaccountandroid.accounts.AccountManager?
    ACTIVITY_SERVICEactivityA ActivityManager for interacting with the global activity state of the system.android.app.ActivityManager
    ALARM_SERVICEalarmA AlarmManager? for receiving intents at the time of your choosing.android.app.AlarmManager?
    AUDIO_SERVICEaudioandroid.media.AudioManager
    CLIPBOARD_SERVICEclipboardA ClipboardManager? for accessing and modifying the contents of the global clipboard.android.content.ClipboardManager?
    CONNECTIVITY_SERVICEconnectionA ConnectivityManager? for handling management of network connections.android.net.ConnectivityManager?
    DEVICE_POLICY_SERVICEdevice_policyandroid.app.admin.DevicePolicyManager?
    DOWNLOAD_SERVICEdownloadA DownloadManager? for requesting HTTP downloadsandroid.app.DownloadManager?
    DROPBOX_SERVICEdropboxandroid.os.DropBoxManager?
    INPUT_METHOD_SERVICEinput_methodAn InputMethodManager for management of input methods.android.view.inputmethod.InputMethodManager
    INPUT_SERVICEinputandroid.hardware.input.InputManager
    KEYGUARD_SERVICEkeyguardA KeyguardManager? for controlling keyguard.android.app.KeyguardManager?
    LAYOUT_INFLATER_SERVICElayout_inflaterA LayoutInflater for inflating layout resources in this context.android.view.LayoutInflater
    LOCATION_SERVICElocationA LocationManager? for controlling location (e.g., GPS) updates.android.location.LocationManager?
    MEDIA_ROUTER_SERVICEmedia_routerandroid.media.MediaRouter?
    NFC_SERVICEnfcandroid.nfc.NfcManager?
    NOTIFICATION_SERVICEnotificationA NotificationManager for informing the user of background events.android.app.NotificationManager
    NSD_SERVICEservicediscoveryandroid.net.nsd.NsdManager?
    POWER_SERVICEpowerA PowerManager? for controlling power management.android.os.PowerManager
    SEARCH_SERVICEsearchA SearchManager? for handling search.android.app.SearchManager?
    SENSOR_SERVICEsensorandroid.hardware.SensorManager?
    STORAGE_SERVICEstorageandroid.os.storage.StorageManager?
    TELEPHONY_SERVICEphoneandroid.telephony.TelephonyManager?
    TEXT_SERVICES_MANAGER_SERVICEtextservicesandroid.view.textservice.TextServicesManager?
    UI_MODE_SERVICEuimodeAn UiModeManager? for controlling UI modes.android.app.UiModeManager?
    USB_SERVICEusbandroid.hardware.usb.UsbManager
    VIBRATOR_SERVICEvibratorA Vibrator? for interacting with the vibrator hardware.android.os.Vibrator?
    WALLPAPER_SERVICEwallpapercom.android.server.WallpaperService?
    WIFI_P2P_SERVICEwifip2pandroid.net.wifi.p2p.WifiP2pManager?
    WIFI_SERVICEwifiA WifiManager? for management of Wi-Fi connectivity.android.net.wifi.WifiManager
    WINDOW_SERVICEwindowThe top-level window manager in which you can place custom windows. The returned object is a WindowManager.android.view.WindowManager
    BATTERY_SERVICEbatterymanagerfor managing battery state (Android 5.0)BatteryManager?
    JOB_SCHEDULER_SERVICEtaskmanagerfor managing scheduled tasks (Android 5.0)JobScheduler?
    NETWORK_STATS_SERVICEnetstatsfor querying network usage statistics.(Android 6.0)NetworkStatsManager?
    HARDWARE_PROPERTIES_SERVICEhardware_propertiesaccessing hardware properties. (Android 7.0)HardwarePropertiesManager?

実装

関連