Keep GPS on with screen off for HD2 w/ Android

Started by gromsy, March 14, 2011, 05:47:53

0 Members and 2 Guests are viewing this topic.

gromsy

Hello, I love your app - it is absolutely the most awesome mapping app out there except for one problem with HTC HD2 phones using Android:
When my screen turns off, the GPS turns off too, so I can't use it for recording at all. When I turn on the screen again the GPS turns back on but the GPS does not lock and I need to go into the GPS screen of Locus, turn GPS off, then turn it on again to get another lock.

I have tested the app Cardio Trainer on the same phone (HTC HD2 - Hyperdroid GBX v8 http://forum.xda-developers.com/showthread.php?t=918899 ) and the Cardio Trainer app does not have the same problem - ie. the GPS stays on, locked and recording all the time when the screen is off, so I know for sure that it is a software problem and not a problem with the phone or ROM. Other HD2 users, with other mods of Android have reported the same problem with Locus but no problem with other apps like Cardio Trainer and Radardroid.

Please fix it so we can all enjoy using your great app too!

Cheers.
  •  

berkley

#1
Hi gromsy,

Can you please do two little tests:

1st test:
- run locus
- wait for gps fix
- start recording a track in Locus (the little icon appears in notification bar)
- turn the screen off, wait a moment, turn the screen on again
- what is the result? do you have a gps fix or not?

2nd test:
- if available, start MyTracks, if not get it from market and start it
- wait for gps fix
- start recording a track in MyTracks (the little icon appears in notification bar)
- run Locus (you should have a gps fix within a second)
- turn the screen off, wait a moment, turn the screen on again
- what is the result? do you have a gps fix or not?

Thanks for your cooperation in trying to fix your problem ;)

Regards, berkley
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
  •  

gromsy

#2
Hey berkley,

Thanks for the quick response! I ran the two tests with the following results:

Test 1 - I got a GPS fix in Locus, started recording, then turned off the screen. When I turned the screen on again, the GPS wasn't even turned on at first (no icon in the taskbar), then it turns on again after about 1 second, but doesn't get a fix at all unless I turn the GPS off in Locus, then turn it back on again.

Test 2 - I got a GPS fix in MyTracks, started recording, then went into Locus, got a GPS fix in there and turned off the screen. Suprisingly, the GPS still had a fix and was turned on when I turned the screen on again!

Does this give you any indication of how to fix it? Sure hope it does!

Cheers!
  •  

berkley

#3
Hi Gromsy,

you're fast with the tests ;)
So as I don't know anything about coding, programming or developping, I don't know if this can be fixed. On my phone and (as far as I know) on all other phones you have a GPS fix in Locus when you do the first test. Probably there is a hardware issue with the HD2, as it wasn't meant to be an Android phone.

I think it is a feature, that was built in, to prevent battery draining too fast and the HD2 can't handle it correctly.

In the meantime, you now know, how you can trick out Locus.
Another solution is the usage of an external bluetooth GPS receiver. If you want to do that, you shouldn't use the Locus-own gps bluetooth service. Run a GPS Provider like http://www.appbrain.com/app/bluetooth-g ... ilej.btgps

Hope that helps?

Regards
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
  •  

gromsy

#4
Ok, thanks for the tip and the help! I'll use the workaround with MyTracks until Locus supports our HD2's as well!
Cheers!
  •  

neneezatch

#5
Hi, I have hd2 too an Locus works correctly...
try this: go to GPS settings and type into "Time between GPS locations" 0  (zero)...and it should work :-)
( I have Rafdroid HD 4.0.2)
  •  

gromsy

#6
Really neneezatech? I tried changing that setting before but it didn't work for me because GPS still turned off whenever I turned the screen off, so I've been using the workaround that berkley kindly suggested for me. Maybe a newer version of Locus has fixed the problem. I'll try it again and see how it works.
Thanks!
  •  

Menion

#7
I worried that new version will be same. I do nothing with this "issue". Because by me this is not Locus problem but problem with your custom ROM. Is there any chance you could try never version or another rom? (same as neneezatch for example)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

#8
I am currently running HyperDroid GBX (v9) on my HD2, "Time between GPS locations" set to 0 works, anything else powers the GPS down on standby, completely. And, while the with "Time between GPS locations" set to zero it actually works properly, the current consumption is way too high, my estimation is - it would be enough for maybe 8 hours of tracking. The only real solution for this is fixing the GPS power management stuff on the HD2 ROM/kernel.

NOTE: as a partial workaround i've made myself a little tasker script that can be fired up, for example, every 5 minutes, acquire a lock and store a location. The resulting csv file may be converted to anything you may like (kml, gpx, whatever) using the gpsbabel pc app. This script is probably not going to work in case the "Time between GPS locations" set to 0 doesn't, though.
  •  

Menion

#9
I founded this short discussion during search for some solution

http://forum.xda-developers.com/archive ... 75909.html

seems to be some global problem with HD2 roms. I currently don't know hot to "fix" this so use another method like berkley said or try another rom
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •