[Q] Any way to override the Location Services confirmation? - Android Q&A, Help & Troubleshooting

I want to write a Tasker script that'll turn off Location Services when the screen's off (to kill the location wakelocks), but the problem is that turning Location Services back on produces the confirmation dialog and requires input to continue.
Is there any way to override this? Mod, hack, app, I don't care.

Related

How do I disable Google Latitude Service?

I recently installed Semi V17 and an updated BetterBatteryStats version. With that combination, I noticed that my device was never able to move into deep sleep due to constant location updates, thus causing battery drain. I think I've narrowed down the culprit for my battery drain, however, I'm not sure I know how to resolve it. It appears to be the Latitude support in Google Maps. I'm not enrolled in Latitude, but based on "adb shell dumpsys" output, it appears that it is running and requesting location updates constantly. The following is the registration for location updates from dumpsys. Notice that it is specifying no minimum time or distance, which implies (to me) constant updates.
Code:
Receiver{419e7ad0 Listener [email protected]}mUpdateRecords: {passive=UpdateRecord{421e75a0 mProvider: passive mUid: 10084}}:
passive:
UpdateRecord{421e75a0 mProvider: passive mUid: 10084}
mProvider=passive mReceiver=Receiver{419e7ad0 Listener [email protected]}mUpdateRecords: {passive=UpdateRecord{421e75a0 mProvider: passive mUid: 10084}}
mMinTime=0 mMinDistance=0.0
mSingleShot=false
mUid=10084
Dumpsys identifies the 10084 process as the LocationFriendService:
Code:
*APP* UID 10084 ProcessRecord{41af23e8 13037:com.google.android.apps.maps:LocationFriendService/10084}
class=com.google.googlenav.android.AndroidGmmApplication
Does anyone have any idea how to disable this service without completely freezing/removing the Google Maps application?
Thanks,
Craig
Have you turned off automatic location detection in the Latitude/Maps settings? You can completely disable it or set so it asks you to update it manually.
Also if you have Facebook installed make sure you disable location reporting in your Facebook app settings. That was a big one for me.
One other thing to check is any widgets that use location detection (like weather widgets).
In settings... same place where you enable the GPS.
Strangely, I had to click through to enable Latitude before I could get to the settings to control Latitude and really shut it off. I've now turned off everything I could find related to Latitude and will see if that "sticks". Previously, it would seem to work for some period of time and then all of the sudden start running like crazy, so until I've run like this for at least 24 hours I'm just not going to know if I've truly managed to disable this service.
Next time, check here first.http://www.chucknorrisfacts.com/
Sent from my SAMSUNG-SGH-I777 using Tapatalk 2
csetera said:
Strangely, I had to click through to enable Latitude before I could get to the settings to control Latitude and really shut it off. I've now turned off everything I could find related to Latitude and will see if that "sticks". Previously, it would seem to work for some period of time and then all of the sudden start running like crazy, so until I've run like this for at least 24 hours I'm just not going to know if I've truly managed to disable this service.
Click to expand...
Click to collapse
It appears like disabling all things Latitude has cured my battery drain. If only they hadn't hidden those settings, it would have been way more obvious. Thanks for the tip.

Can anyone help a Tasker noob?

I finally decided that I was missing out by not having Tasker automate my life for me, so bought it as well as the full version of Secure Settings.
I've managed a couple of simple Profiles, but I'm having trouble with other stuff I want to do - most likely because I just don't understand.
A. Aim: When Maps is launched, turn on "WiFi" and "Location Mode High Accuracy"
Profile: Near Work
State: Cell Near (work)
Tasks: (1) WiFi On (2) Secure Settings, Location Mode/High Accuracy
This almost works - opening Maps carries out the expected tasks, and when I exit maps WiFi turns off (desired behaviour). However, Location does not switch off again, it stays on switched on, and I don't understand why.
I'd like Location to switch off again when I exit Maps.
B. Aim: Switch on WiFi and Location Mode/Battery Saving and Location Reporting and Location History once an hour, for one minute, and allow (force?) Google to poll my location for a short period so that if I ever lose my phone and it is switched off, there will be a trail of sorts (without having to leave all these services switched on all the time,which canes my battery).
Profile: Manage Location Services
State: Time - I don't know how I can make the profile active for one minute, every hour
Tasks: (1) WiFi On
Then I get lost - I can't see how to enable Location Reporting which is in Location Services in my phone settings. Also I don't know if doing that would immediately prompt the phone to contact Google and report its location (I assume it would).
C: Aim: Between 10pm-9am, if at home, then silence phone and switch off notification light
State: Cell near (home)
This is as far as I've got. I don't understand how to use time as a defining factor. Nor do I know how to switch off the notification light.
If anyone could help then I'd be very grateful!
Also, after reading a lot of Tasker walkthroughs/userguides (and not understanding a lot of them) I am none the wiser as to how to set up an 'exit task'?
There are a lot of issues regarding Secure Settings, I don't recommend it. The only way to turn on/off gps (and the way I'd do it personally) is use root shell to navigate through the settings or better yet set Status Bar-Open and using a Shell-"input tap x y" Use Root: Yes to tap on the GPS quick setting widget.
To add an exit task simply long press on the action part of your profile (on the main screen) and the options will appear. You can also add additional State, Time or Action matchings to your one profile, by long-pressing on the left part!
<<< Please say thanks if I was of help.
Sent from my SCH-I605 using xda app-developers app

help writing an android script

I would like to have a script that I can use on any modern androids that sets the phone at bootup to turn the GPS and wifi on, ideally without giving notification. This is to aid in lost phone recovery where the thief knows enough to turn location off. I would be using Googles location tool for the finding. Maybe the script could specify to periodically enable location in case thief turns location off periodically

[Q] Default accept “Improve Location Accuracy” popup with GooglePlayServices update

I have an application which is installed in the phones cab drivers use to track the location and distance traveled by the cab. (The phone is rooted and we have all privileges on the phone). In the first implementation of our application we used LocationManager.requestLocationUpdates to get location updates from GPS and Network providers. Since we need to capture every kilometer traveled by the cab we enabled "High Accuracy" mode in location settings.
For two reasons we are willing to move to Fused-location-provider
For some reason (a known bug in android: https://code.google.com/p/android/issues/detail?id=57707) NETWORK_PROVIDER is not providing location updates.
For some reason the devices are suddenly loses GPS fix and are not gaining again until the device reboots.
We observed that FusedLocationProvider is giving better results and are planning to change our application to use FusedLocationProvider. Now the problem is - our devices have an older version of GooglePlayServices which does not have LocationServices. Two options we have are
Use older version of FusedLocationProvider using LocationRequest and LocationClient. Though it is giving good results outdoors(which is our primary requirement), we are not getting location updates(not-at-all) indoors even with wifi enable and with good network signal (This also seems to be a known issue (Location updates not working indoors as claimed by Fusion Location Provider APIs). So, i suspect there could be some bugs in older version of GooglePlayServices and/or FusedLocationProvider which would have been fixed in later versions.
Update GooglePlayServices on all phones (by installing apk over the air) and use LocationServices to get location updates with high accuracy as priority. This implementation is giving location updates even indoors which is what we expect -- Here the problem is when I update GooglePlayServices with an apk when I request location updates in my application it is opening 2 popups one asking for confirmation to improve location accuracy and the other is to turn on ability for google apps to use my location. It is working fine even if I don't accept second popup but if I don't accept the first popup it is changing the location setting to "Device Only" mode (which means only GPS provider is used).
Improve Location Accuracy https://40.media.tumblr.com/53af918884f8ab444ec6352e3e710007/tumblr_npfjbwwnKV1uxztu6o1_540.jpg
Permission to enable google apps to use location
https://40.media.tumblr.com/0eb9a64f55032fe2250a18dd6e0755cc/tumblr_npfjbwwnKV1uxztu6o2_540.jpg
We can not expect all our drivers to accept the popup when it is shown. I would like to know if there is any way I can do "default accept" kind of thing for the first popup so that my devices remain in "High Accuracy" mode.
I found a solution to disable location consent which comes when high accuracy mode is enabled manually in Location Settings as suggested in http://forum.xda-developers.com/galaxy-s2/themes-apps/mod-disable-google-location-consent-t2791431 That solution was working with our old application but with updated GooglePlayServices it is not working. I saw some google-play-services-MOD-apks out there on net so I thought it would be possible to modify the apk, sign it and install it., but when I try to modify the Google play services apk and signit with one click signer and install it is failing with inconsistent certificates error.
Any way of achieving this - like executing a command in device shell , issuing an intent or modifying the GooglePlayServices apk itself is fine with me.
Device Type : MotoE - XT1022
Android Version : 4.4.4
Build Number : KXC21.5-40

Location Reporting option missing - can it be turned off manually?

Hi. I hope I am posting this in the right place. So I have an LG Nexus 4 which has Kitkat 4.4.* and an updated google service apparently. The location reporting option is no longer available, only the history one. Now my problem is that I accidentally agreed to let google report location data in exchange for higher location accuracy. However I cannot revert this agreement anywhere. Each time I turn off/on the Location service, it resets to the highest accuracy, thus also reporting the location. It doesn't use my last setting as default. Is there a way to force default (device only) setting on it somehow? Or revert this option back to "always ask" or something? I can't find almost anything about this on the web. I'm afraid that it sets this into the google account itself, so my only option could be forcing the phone to default to the desired one. Is it even possible?:/
Any help is appreciated!

Categories

Resources