Here’s a partial listing of the available services on android.
Access the Service Manager and list available services
android.os.IServiceManager sm = android.os.ServiceManagerNative.getDefault();
try {
String[] services = sm.listServices();
for (int i = 0; i < services.length; i++) {
Log.i("Services", i + " : " + services[i]);
}
} catch (DeadObjectException e) {
Log.i("Services", e.getMessage(), e);
}
Now we try to dig thru the API to figure out which ones are available to applications. Here’s what i have found so far.
USB
android.os.IUsb usbService = android.os.IUsb.Stub.asInterface(sm.getService("USB"));
javadoc – IUsb
activity
android.app.IActivityManager activityService = android.app.IActivityManager.Stub.asInterface(sm.getService("activity"));
alarm
android.app.IAlarmManager alarmService = android.app.IAlarmManager.Stub.asInterface(sm.getService("alarm"));
content
android.content.IContentService contentService = android.content.IContentService.Stub.asInterface(sm.getService("content"));
location
android.location.ILocationManager locationService = android.location.ILocationManager.Stub.asInterface(sm.getService("location"));
notification
android.app.INotificationManager notificationService = android.app.INotificationManager.Stub.asInterface(sm.getService("notification"));
org.bluez.bluetooth
org.bluez.IBluetoothService bluetoothService = org.bluez.IBluetoothService.Stub.asInterface(sm.getService("org.bluez.bluetooth_service"));
javadoc – IBluetoothService
package
android.content.IPackageManager packageService = android.content.IPackageManager.Stub.asInterface(sm.getService("package"));
phone
android.telephony.IPhone phoneService = android.telephony.IPhone.Stub.asInterface(sm.getService("phone"));
javadoc – IPhone
power
android.os.IPowerManager powerService = android.os.IPowerManager.Stub.asInterface(sm.getService("power"));
statistics
android.os.IStatisticsService statisticsService = android.os.IStatisticsService.Stub.asInterface(sm.getService("statistics"));
statusbar
android.server.status.IStatusBar statusbarService = android.server.status.IStatusBar.Stub.asInterface(sm.getService("statusbar"));
vibrator
android.os.IVibratorService vibratorService = android.os.IVibratorService.Stub.asInterface(ServiceManager.getService("vibrator"));
volume
android.view.IRingerVolume volumeService = android.view.RingerVolumeNative.asInterface(sm.getService("volume"));
window
android.view.IWindowManager windowService = android.view.IWindowManager.Stub.asInterface(sm.getService("window"));