How to enable/disable gps and mobile data in android programmatically?

后端 未结 2 737
[愿得一人]
[愿得一人] 2021-01-01 04:49

I want my application to be able to enable/disable gps and mobile data programmatically as there are many apps like tasker, profile flow, lookout extra which can do this so

2条回答
  •  长发绾君心
    2021-01-01 05:26

    I want my application to be able to enable/disable gps

    Fortunately, this is not possible, for obvious privacy reasons. While there were some hacks, like the one in your question, that used to work, those security flaws have since been fixed.

    as there are many apps like tasker, profile flow, lookout extra which can do this

    You are welcome to supply evidence that any of those apps can do this on modern versions of Android.

提交回复
热议问题