Reputation: 121
There is an old question about it (Toggle gps on root devices on Android)....
I really need enable GPS using a su command without any notification ... My code is above:
public static void turnOnGPS(){
try {
String mCommand = "adb shell settings put secure location_providers_allowed gps,network,wifi ";
Shell.runAsRoot(mCommand);
Utilities.log("GPS Actioned.");
}catch (Exception o){
Utilities.log(o.toString());
}
}
Upvotes: 0
Views: 1021
Reputation: 121
I found the solution..... I did the following:
Upvotes: 0