How to stop the service of another application on Android?

On my device, the service in the application is running (its not my application, and I can’t remove it, and my device is not implemented), which always drains the power. I can stop this service in the settings of my devices, but is there a way to stop it programmatically, so I don’t need to do this manually all the time?

Maybe something like stopService (...); works?

Is there a way to change the scheduler to prevent service reboots?

"W/ActivityManager(178): Scheduling restart of crashed service xxxx in 5000ms 
+6
source share
2 answers

Get the process id for this particular application, and then

android.os.Process.killProcess (processIdKillService)

+1
source

Here is a long snapshot (I have never tried it):

0
source

Source: https://habr.com/ru/post/914680/


All Articles