We can not programmatically turn on mobile data and gps but still miui 10 has emergency sos feature under which it automatically turns on mobile data and gps. So how can I do this with stock and source code?
Asked
Active
Viewed 51 times
-1
-
1Any link to that? Non-Stock OS can have any Non-Stock OS behavior it wants... Samsung has Knox, that completely bypasses Android, Nokia used to have one (don't remember the name), so, a custom build will behave as it desires, as long as it does not oppose the expected behavior and documentation – Bonatti Jan 08 '20 at 18:23
1 Answers
0
MIUI is a different rom than stock android. This feature is not possible in the stock Android experience and thus cannot be made using an application or a service. However, by creating a custom rom, such restrictions can be navigated through.

Nissim R
- 542
- 11
- 29
-
Thanks for answering. As you said custom rom is an option so how I can turn on mobile data and gps in custom rom through some code. Like if I want to develop custom rom then I will download android source code and do some changes according to my requirements. So can you please provide some useful link or resources which can help me to achieve my goal. – Nilesh Jan 08 '20 at 18:51
-
This question which you've just asked is too broad to answer here. I suggest doing a google search and then sifting through your results, cooking up code, and then if you run into errors or wanna figure out a specific thing you want to accomplish, then post it here. Custom roms are a pretty big rabbit hole and you can go super deep and have amazing fun while doing it. Good luck! – Nissim R Jan 09 '20 at 22:35