Related
Hi all,
How to switch on GPS programatically.
Thanks & Regards,
Dinesh
You can't do that other way than opening GPS settings. Security concerns.
Use SwitchPro widget, Luke
Thanks for your reply
o4kareg said:
Use SwitchPro widget, Luke
Click to expand...
Click to collapse
Hmm, are you sure it really enable/disable GPS directly? As I said I believe this isn't possible without some hacking, root access, etc. Just tried "GPS on/off" widget from the Market (because SwitchPro is paid app) and it does exactly what I said: it opens locations settings.
ok thanks for your reply.
I can Enable/Disable GPS directly. but i can't Enable/Disable GPS programatically.
dineshsubramanian said:
I can Enable/Disable GPS directly.
Click to expand...
Click to collapse
Using that SwitchPro widget?
Brut.all said:
Hmm, are you sure it really enable/disable GPS directly? As I said I believe this isn't possible without some hacking, root access, etc. Just tried "GPS on/off" widget from the Market (because SwitchPro is paid app) and it does exactly what I said: it opens locations settings.
Click to expand...
Click to collapse
I am sure, becaus I'm using this widget. Older versions just opened GPS settings, but latest one v1.6 turns GPS on/off directly.
o4kareg said:
I am sure, becaus I'm using this widget. Older versions just opened GPS settings, but latest one v1.6 turns GPS on/off directly.
Click to expand...
Click to collapse
Yes it does, doesn't appear to be using root either. It's possible it could be using an exploit though?
o4kareg said:
I am sure, becaus I'm using this widget. Older versions just opened GPS settings, but latest one v1.6 turns GPS on/off directly.
Click to expand...
Click to collapse
Maybe it requires root? Or some custom ROM? Unfortunately it's paid app and I won't pay for it just to check, how it works. I don't think it uses "clean" way to accomplish that.
Ok, it uses Power Control widget to set GPS status. This widget is a system app, so it has superpowers (can enable/disable GPS directly) and SwitchPro let him think, that someone has clicked on GPS button.
Of course this widget isn't in official Android API, it isn't integral part of Android system, so this may not work on some devices, some ROMs, may also break totally in the future. You could use same technique, but you shouldn't.
EDIT:
Ahh and seems this widget is a huge security hole. This should be fixed, I will create an issue in Android issue tracker, if there isn't one.
Brut.all said:
Ahh and seems this widget is a huge security hole. This should be fixed, I will create an issue in Android issue tracker, if there isn't one.
Click to expand...
Click to collapse
Ok, this is already in their issue tracker:
http://code.google.com/p/android/issues/detail?id=7890
Thought as much, the dev should really go back to the 'official' way IMO.
Is there still a way to do this ? Because on the issue tracker page they said it was already "fixed" (that means broken to me ).
I need to set auto turn on for GPS on a given time. Is that possible ?
grandioso said:
I need to set auto turn on for GPS on a given time. Is that possible ?
Click to expand...
Click to collapse
No. It's a feature, not a bug.
Feature of what ? Do you mean the android power management widget ?
If it's a feature, than it should still be possible to turn on GPS through it.
grandioso said:
Feature of what ? Do you mean the android power management widget ?
If it's a feature, than it should still be possible to turn on GPS through it.
Click to expand...
Click to collapse
It's safety concern. Google didn't give you a possibility to switch GPS purposely and only one reason, why you could do it, was that they made some security hole. Now they have fixed it, so you won't be able to switch GPS - at least without another bug ;-)
Hi androiest
How can google map start gps without going throught the settings activity ??
I am having Motorola Atrix 2 Asia retail ver. i recently updated to ICS through OTA update, in smart actions i found that whenever i set a rule to conserve the battery it doesn't work as it should. for eg. when i set the rule to disable background sync and mobile data it works when the phone is unlock and as and when i unlock the phone it again shows the background sync. ideally this shouldn't happen until i disable the rule. has anybody experience the similar issue.
Another issue i found that after updating the firmware to ICS, battery drains too early, are there any preventive measures or tool that can help to manage this issue.
one more issue is that earlier in 2.3 firmware, we were able to disable all animations from system settings, now currently i cannot see the same in system setting has this feature moved or removed. ?
i would appreciate if someone can really provide solutions for the above mentioned issues.
tusharh said:
I am having Motorola Atrix 2 Asia retail ver. i recently updated to ICS through OTA update, in smart actions i found that whenever i set a rule to conserve the battery it doesn't work as it should. for eg. when i set the rule to disable background sync and mobile data it works when the phone is unlock and as and when i unlock the phone it again shows the background sync. ideally this shouldn't happen until i disable the rule. has anybody experience the similar issue.
Another issue i found that after updating the firmware to ICS, battery drains too early, are there any preventive measures or tool that can help to manage this issue.
one more issue is that earlier in 2.3 firmware, we were able to disable all animations from system settings, now currently i cannot see the same in system setting has this feature moved or removed. ?
i would appreciate if someone can really provide solutions for the above mentioned issues.
Click to expand...
Click to collapse
You can disable animations from settings -> developer options. There are two options called "windows animation scale" and "transition animation scale". You can disable these.
As far as the battery is concerned, I am not having any battery drain issues after ICS update. Please disable connections like wifi, gprs and GPS when not required. Set display to minimum. This might help.
Sent from my MB865 using xda premium
tusharh said:
I am having Motorola Atrix 2 Asia retail ver. i recently updated to ICS through OTA update, in smart actions i found that whenever i set a rule to conserve the battery it doesn't work as it should. for eg. when i set the rule to disable background sync and mobile data it works when the phone is unlock and as and when i unlock the phone it again shows the background sync. ideally this shouldn't happen until i disable the rule. has anybody experience the similar issue.
Another issue i found that after updating the firmware to ICS, battery drains too early, are there any preventive measures or tool that can help to manage this issue.
one more issue is that earlier in 2.3 firmware, we were able to disable all animations from system settings, now currently i cannot see the same in system setting has this feature moved or removed. ?
i would appreciate if someone can really provide solutions for the above mentioned issues.
Click to expand...
Click to collapse
Just to make sure, In Smart Actions, if you happen to copy the "Night Time Batter Saver" to start with then there is default trigger included as Display off which essentially disable mobile data and background data only when display off. It seems working fine for me on AT&T Ics leak #1
Is it normal for the GPS status icon to always be present in the right side of the status bar on Lollipop (V5.02)?
Location is enabled and is set to high accuracy. No apps are running (or present in the recent apps list) that make constant use of the GPS (IE: Maps).
I'm curious if this is normal behavior on this device. I have 3 other devices to compare to that have the same apps and location settings :
- Galaxy S3 -- Icon is always present when location is enabled (Android 4.4)
- Nexus 5 -- Icon only appears when an app requests use of the GPS (Android 5.1.1)
- Nexus 9 -- Icon only appears when an app requests use of the GPS (Android 5.1.1)
the.teejster said:
Is it normal for the GPS status icon to always be present in the right side of the status bar ?
Location is enabled and is set to high accuracy. No apps are running (or present in the recent apps list) that make constant use of the GPS (IE: Maps).
I'm curious if this is normal behavior on this device. I have 3 other devices to compare to that have the same apps and location settings :
- Galaxy S3 -- Icon is always present when location is enabled (Android 4.4)
- Nexus 5 -- Icon only appears when an app requests use of the GPS (Android 5.1.1)
- Nexus 9 -- Icon only appears when an app requests use of the GPS (Android 5.1.1)
Click to expand...
Click to collapse
It does not turn off automatically unless you are running an app to do so. My battery saver app lets you specify a list of apps that need gps...when I run the app it turns on gps...when the app exits it turns gps off. There is also a free version of it..search for "Greeenpower"...it does require root for an app to toggle gps under lollipop.
Thanks for the reply but I didn't think that applied to Android V4.x and UP.
You are supposed to be able to keep your location toggle set on ON all the time and Android is supposed to only enable it when an app requests it.. I can clearly see this behaviour on both my Nexus devices running lollipop.
Since this phone is as close to stock android as I've ever seen I'm wondering if anyone else is observing the same behaviour I am or if else might be keeping it forced on unknowingly.
famewolf said:
It does not turn off automatically unless you are running an app to do so. My battery saver app lets you specify a list of apps that need gps...when I run the app it turns on gps...when the app exits it turns gps off. There is also a free version of it..search for "Greeenpower"...it does require root for an app to toggle gps under lollipop.
Click to expand...
Click to collapse
the.teejster said:
Thanks for the reply but I didn't think that applied to Android V4.x and UP.
You are supposed to be able to keep your location toggle set on ON all the time and Android is supposed to only enable it when an app requests it.. I can clearly see this behaviour on both my Nexus devices running lollipop.
Since this phone is as close to stock android as I've ever seen I'm wondering if anyone else is observing the same behaviour I am or if else might be keeping it forced on unknowingly.
Click to expand...
Click to collapse
Mine is also constantly on.
Macklessdaddy said:
Mine is also constantly on.
Click to expand...
Click to collapse
Mine is constantly on, like now.
the.teejster said:
Thanks for the reply but I didn't think that applied to Android V4.x and UP.
You are supposed to be able to keep your location toggle set on ON all the time and Android is supposed to only enable it when an app requests it.. I can clearly see this behaviour on both my Nexus devices running lollipop.
Since this phone is as close to stock android as I've ever seen I'm wondering if anyone else is observing the same behaviour I am or if else might be keeping it forced on unknowingly.
Click to expand...
Click to collapse
Well no offense but yours must be magic then cause I own both a nexus 4 and 5 and the gps doesn't turn off unless you or an app turns it off...same with bluetooth and wifi for that matter.
famewolf said:
Well no offense but yours must be magic then cause I own both a nexus 4 and 5 and the gps doesn't turn off unless you or an app turns it off...same with bluetooth and wifi for that matter.
Click to expand...
Click to collapse
I don't think he means it turns off in the settings. But the location active icon in the status bar only comes on when an app is actively using it. My nexus 4 does this. The idol the icon is always there.
IMO, its probably just a software GUI change that Alcatel did. Unless it is draining the battery more than usual.
Non taken .. LOL..
Bluetooth and Wifi, when on do constantly show up on my nexus devices..
Location icon however, on stock lollipop will only appear when the GPS actually is in use. IE: It will appear when I load up google maps and disappear when I turn it off (on stock 5.1.1 on nexus 5 and 9).
I thought this was a feature baked into lollipop which is why I was asking. But from I'm hearing it's not.
Thanks everyone for taking the time to reply.. much appreciated.
BTW:
Looks like it's default behavior on at least one other device:
http://talk.sonymobile.com/t5/Xperi...t-appear-in-statusbar-on-lollipop/td-p/975946
Location
famewolf said:
Well no offense but yours must be magic then cause I own both a nexus 4 and 5 and the gps doesn't turn off unless you or an app turns it off...same with bluetooth and wifi for that matter.
Click to expand...
Click to collapse
Maybe there is a secret Chinese system app that is continually tracking you with location? Haha
I was concerned about this too, and looked into it, I can 100% confirm that it's a software change. On the stock Idol 3 ROM, the location icon in the task bar merely shows that location is on, NOT THAT GPS is active.
If you're skeptical, download a GPS monitor app (some available without root, better ones available with root). You can confirm for yourself that the GPS monitor pings each and every time you use a location-based app (map, weather, etc), but not otherwise, even though the location icon is on.
It's constantly on for my Idol 3, but not my Moto X with CM 12.1.
A fix for this problem, if you have Xposed installed:
http://repo.xposed.info/module/com.xinlu.location_icon_fix
polygonal said:
A fix for this problem, if you have Xposed installed:
http://repo.xposed.info/module/com.xinlu.location_icon_fix
Click to expand...
Click to collapse
Very nice! Thanks for creating the module! Out of curiosity do you get the popup every time you install an app or module to select whether to install to internal, external or let the system decide?
famewolf said:
Very nice! Thanks for creating the module! Out of curiosity do you get the popup every time you install an app or module to select whether to install to internal, external or let the system decide?
Click to expand...
Click to collapse
Yes, I do. If I remember correctly, this started to happen around the time of the last update from Alcatel?
polygonal said:
Yes, I do. If I remember correctly, this started to happen around the time of the last update from Alcatel?
Click to expand...
Click to collapse
Thanks for the reply. Nice to know it's not just MY phone. On my 6045i it's been happening quite a while if not from the beginning but it's very annoying as I have not yet found a way to disable it. Even running "pm set-install-location" from a shell doesn't stop the popup. Normally the setting would be under settings, apps or settings, storage but doesn't appear to be.
I'd compare this to some manufacturers adding an NFC icon. They think the user wants to know (all the time) if a setting is on or off.
the icon appears for me always; even after I turn location OFF in the settings...
so is it a bug or is it on purpose?
i've noticed if you turn off the location and then back on, the icon doesn't show up until something does request location, but then after that the icon stays there forever
ps. i'm glad i found this thread i thought i was going crazy
Thanks for the module.
**TheDuke** said:
I was concerned about this too, and looked into it, I can 100% confirm that it's a software change. On the stock Idol 3 ROM, the location icon in the task bar merely shows that location is on, NOT THAT GPS is active.
If you're skeptical, download a GPS monitor app (some available without root, better ones available with root). You can confirm for yourself that the GPS monitor pings each and every time you use a location-based app (map, weather, etc), but not otherwise, even though the location icon is on.
Click to expand...
Click to collapse
Please, could you suggest an app for GPS monitoring? I'm on a Xperia M4 Aqua Android 5.0.2 and facing the same problem. It's driving me crazy...
So I have successfully upgraded OTA to 6.0.1 and rooted.
I'd like a relatively easy way to turn hot spot on and off without having to go through at least three clicks (and that's if I put the Settings icon on the home screen; otherwise it's four).
The old tried-and-true method of editing the Settings DB with SQLite no longer works. I thought I'd just give the new System UI Tuner a try, but it would appear that Sprint/Samsung have locked this out. The two known methods to enable it (long press on the gear icon after pulling down the window shade, or going to Developer Options under settings) are not available on the Sprint S5. I can see the System UI Tuner package intact on the phone, but there's no way, as far as I can tell, to launch it.
For that matter, Sprint seems to have removed all the Settings widgets except "Flashlight," so you can't even put a setting widget on the home screen to get you close.
If anyone has figured out how to get into the UI Tuner, or restore the locked Settings widgets, please let me know.
Before anyone suggests it, yes, I am aware that there is a root app to enable/disable the hot spot on the market, and I have the APK for it. I removed it because it runs continuously, even when not using the hot spot, generating "granted root access" popups at inopportune times. Besides, I'd kinda like to see what else is in the UI Tuner to tweak.
Thanks.
-Sean
Sprint S5 stock rooted
G900PVPU3CPG1
I have yet to find the Vulcan grip to open ui tuner.. does your version have a mobile data toggle?
mordantly said:
.. does your version have a mobile data toggle?
Click to expand...
Click to collapse
No, I have to go to settings/more networks. That's another tile I would add to quick launch if I could only modify it at all....
-Sean
Hello team,
As you probably know, there is probably an issue in EMUI and killing «automatic processes» application like Tasker & Macrodroid even though they are activated in protected mode and in ignore list of optimization.
I have tried Tasker & Macrodroid as far now without any luck. EMUI version NXT-L29C432B320
Any advise please ?
MobilePerson said:
Hello team,
As you probably know, there is probably an issue in EMUI and killing «automatic processes» application like Tasker & Macrodroid even though they are activated in protected mode and in ignore list of optimization.
I have tried Tasker & Macrodroid as far now without any luck. EMUI version NXT-L29C432B320
Any advise please ?
Click to expand...
Click to collapse
Hi,
go to Settings - Battery - energy plan
and set it to performance
This should fix it
Thanks for answer. I had already test it without luck.
Just a correction, my version is B180 not 320
euerdudeness said:
Hi,
go to Settings - Battery - energy plan
and set it to performance
This should fix it
Click to expand...
Click to collapse
Please let me know if this parameterization had the expected result to your schedules. Which application of them.do you have ?
Any news guys ? I only have this problem?
Come guys. Please, no one has this problem?
I have problems on this with Tasker and other apps not being able to stay on in the Accessibility.
I can't keep up my sleep cycle alarm up all night ._. this is ultra annoying. Not only I can't send smses from 3rd pty apps like mighty text, or pushbullet, but now I can't even use these apps, which sleep crappy EMUi.
I'm running Android 7.0 with EMUI 5.1 on Huawei P10 and I experienced that my Runkeeper is killed time to time as well.
I just found a hidden menu with battery optimization. Go to Settings >> Apps >> Settings (a gear icon at the bottom) >> Special access >> Ignore battery optimization. Found your app and disallow the optimization.
I haven't tried that yet but it might help.
update: no, it does not work, Runkeeper is still being killed :-/
kayncz said:
I'm running Android 7.0 with EMUI 5.1 on Huawei P10 and I experienced that my Runkeeper is killed time to time as well.
I just found a hidden menu with battery optimization. Go to Settings >> Apps >> Settings (a gear icon at the bottom) >> Special access >> Ignore battery optimization. Found your app and disallow the optimization.
I haven't tried that yet but it might help.
Click to expand...
Click to collapse
Except we can't see all apps, and mainly the ones which I would like to see inside.
kayncz said:
I'm running Android 7.0 with EMUI 5.1 on Huawei P10 and I experienced that my Runkeeper is killed time to time as well.
I just found a hidden menu with battery optimization. Go to Settings >> Apps >> Settings (a gear icon at the bottom) >> Special access >> Ignore battery optimization. Found your app and disallow the optimization.
I haven't tried that yet but it might help.
update: no, it does not work, Runkeeper is still being killed :-/
Click to expand...
Click to collapse
I can confirm this does not solve the problem. On my Honor 9 (EMUI 5.1) Tasker still gets killed from time to time. I also checked Run in foreground + Show notification icon in Tasker options.