Reputation: 9103
I want to know how to stop a system service using my app in android, I'm not talking here about stopping a Service Class that exists inside my app, I'm taking about stopping a System Service like (Bluetooth, Mailing, Alarm, WiFi, .....etc) I tried to make it like the following but nothing stopped:
stopService(new Intent(Service.BLUETOOTH_SERVICE));
Upvotes: 1
Views: 2930
Reputation: 31
with root shell,
adb shell am stop-service your-service
To disable the service permanently, you should remount and change the system files to modify related .rc file.
Upvotes: 0
Reputation: 1007554
I want to know how to stop a system service using my app in android,
In the UI of your app, you ask the user to completely power down their phone. If your app is a system app (i.e., installed on the /system
partition, such as a pre-installed app), you may be able to power down the device yourself.
What developers perceive as a "system service" is merely an API to a core OS process. SDK developers do not have control over those processes.
Upvotes: 1