Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Tigggger
Old
#271  
Member
Thanks Meter 2
Posts: 33
Join Date: Nov 2007
Default Trips, A Simple Edit

For some unknown reason I always seem to end up with lots of short trips with only 2 or 3 positions, the program is on all the time so not sure why it's happening but anyway a simple edit to have a new trip each day (Note this will overide the tripname set on your phone)

Around line 70 in requests.php
PHP Code:
$tripname urldecode($_GET["tn"]); 

Change to
PHP Code:
$tripname date("Y.m.d").'-'.$username
HTH
My current location courtesy of TrackMe

The Following User Says Thank You to Tigggger For This Useful Post: [ Click to Expand ]
 
_LEM_
Old
#272  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Quote:
Originally Posted by Tigggger View Post
For some unknown reason I always seem to end up with lots of short trips with only 2 or 3 positions, the program is on all the time so not sure why it's happening but anyway a simple edit to have a new trip each day (Note this will overide the tripname set on your phone)

Around line 70 in requests.php
PHP Code:
$tripname urldecode($_GET["tn"]); 

Change to
PHP Code:
$tripname date("Y.m.d").'-'.$username
HTH
Didn't the WM version had an option to start a new trip name every day?
Maybe I'm wrong. Are you using that version?
Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!
 
Tigggger
Old
#273  
Member
Thanks Meter 2
Posts: 33
Join Date: Nov 2007
Quote:
Originally Posted by _LEM_ View Post
Didn't the WM version had an option to start a new trip name every day?
Maybe I'm wrong. Are you using that version?
I'm on the android version, been a while since I had the WM one so can remember but don't think it did and I've always had the short trips problem.

Might be an idea as an option, but I suspect most people are happy the way it is
My current location courtesy of TrackMe

 
khaytsus
Old
#274  
Senior Member
Thanks Meter 563
Posts: 5,781
Join Date: Apr 2008
Location: Central Kentucky
Quote:
Originally Posted by Tigggger View Post
For some unknown reason I always seem to end up with lots of short trips with only 2 or 3 positions, the program is on all the time so not sure why it's happening but anyway a simple edit to have a new trip each day (Note this will overide the tripname set on your phone)

Around line 70 in requests.php
PHP Code:
$tripname urldecode($_GET["tn"]); 

Change to
PHP Code:
$tripname date("Y.m.d").'-'.$username
HTH
So what's the actual problem, does $tripname sometimes end up blank because tn sometimes doesn't get set by the client or otherwise lost? If you have access to the http server logs, often you'd be able to see those types of errors from there, as PHP will typically tell you if it's using an undefined variable.

But if this is the issue, my suggestion is that you wrap this in an if condition rather than change it... basically something like..

PHP Code:
$tripname urldecode($_GET["tn"]);

if (
$tripname == "")
{
$tripname date("Y.m.d").'-'.$username
}; 
Samsung Note i717 - 4.1.2, CM10 Nightly
Nexus 7 - 4.2.1, Stock Rooted
Try my Alternative XDA CSS Themes (including 2010!)

--
http://theblackmoor.net
http://unlimitedphoto.com
The Following User Says Thank You to khaytsus For This Useful Post: [ Click to Expand ]
 
gorgarath
Old
#275  
Member
Thanks Meter 11
Posts: 56
Join Date: Mar 2008
Location: Pennsylvania
There's the option in the Windows version as well as Android to automatically create a new track name when starting. Just restart TrackMe every day and have it automatically create a new file/track. You can probably get a program to do it automatically, or if you're rooted, use cron.
The Following User Says Thank You to gorgarath For This Useful Post: [ Click to Expand ]
 
Tigggger
Old
#276  
Member
Thanks Meter 2
Posts: 33
Join Date: Nov 2007
Quote:
Originally Posted by gorgarath View Post
There's the option in the Windows version as well as Android to automatically create a new track name when starting.
I already have that set, see below.

Quote:
Originally Posted by khaytsus
So what's the actual problem, does $tripname sometimes end up blank because tn sometimes doesn't get set by the client or otherwise lost?
I have trackme on all the time and never touch it. Using the distance/time setting means it doesn't upload unless I'm moving which is ideal. The problem I have is that sometimes for reasons that I haven't figured out it starts a new trip so for example the other day I had these trips.

Auto_2012.06.08_08.02.35 - 6 positions
Auto_2012.06.08_09.09.02 - 20 positions
Auto_2012.06.08_09.52.30 - 47 positions

With the edit I get
2012.06.08-Damian - 73 positions

Also because it's on all the time it can change
Auto_2012.06.08_08.02.35 - 1000 positions
to
2012.06.08-Damian - 500 positions
2012.06.09-Damian - 500 positions

It's just a simple edit to keep things neater for me
My current location courtesy of TrackMe

 
khaytsus
Old
#277  
Senior Member
Thanks Meter 563
Posts: 5,781
Join Date: Apr 2008
Location: Central Kentucky
Quote:
Originally Posted by Tigggger View Post
Auto_2012.06.08_08.02.35 - 6 positions
Auto_2012.06.08_09.09.02 - 20 positions
Auto_2012.06.08_09.52.30 - 47 positions

With the edit I get
2012.06.08-Damian - 73 positions
Oooooh, I understand now. Your original post made it sound like you were losing data, not that it was getting separated into multiple logical trips. I suspect TrackMe is getting killed by the system and when it restarts, new trip. But yes, that'll certainly fix that issue for you.

Personally I do the same thing, but at a different level. I actually haven't used the TrackMe client in a while, all of my data into the TrackMe server come from my Bluetooth GPS Tracklogger or from Tasker, but the trips are per-day, no hourly breakdown.
Samsung Note i717 - 4.1.2, CM10 Nightly
Nexus 7 - 4.2.1, Stock Rooted
Try my Alternative XDA CSS Themes (including 2010!)

--
http://theblackmoor.net
http://unlimitedphoto.com
 
gorgarath
Old
#278  
Member
Thanks Meter 11
Posts: 56
Join Date: Mar 2008
Location: Pennsylvania
Yeah, sounds like TrackMe is getting put to sleep by the system. If you have root access, I believe there is a way to give priority to TrackMe so it never gets shut down. You could then set up a cron job to restart TrackMe every midnight. But your solution works as well and is already implemented. Hehe

Sent from my Droid X.
 
khaytsus
Old
#279  
Senior Member
Thanks Meter 563
Posts: 5,781
Join Date: Apr 2008
Location: Central Kentucky
Quote:
Originally Posted by gorgarath View Post
Yeah, sounds like TrackMe is getting put to sleep by the system. If you have root access, I believe there is a way to give priority to TrackMe so it never gets shut down. You could then set up a cron job to restart TrackMe every midnight. But your solution works as well and is already implemented. Hehe

Sent from my Droid X.
Making it a system app, ie: putting the apk in /system/app gives even higher priority to TrackMe. I assume Lem's already doing all he can in terms of making it a foreground service with a notification, etc... That's about the highest user-level priority you can give. If rooted, Titanium Backup can do this pretty easy on most devices, although on mine (Galaxy Note) it just spins forever... I just copy then remove the version from /data/app if I need to do this, but only have one app that requires it.
Samsung Note i717 - 4.1.2, CM10 Nightly
Nexus 7 - 4.2.1, Stock Rooted
Try my Alternative XDA CSS Themes (including 2010!)

--
http://theblackmoor.net
http://unlimitedphoto.com
 
_LEM_
Old
#280  
_LEM_'s Avatar
Senior Member - OP
Thanks Meter 70
Posts: 2,253
Join Date: Mar 2006

 
DONATE TO ME
Yeah, by default TrackMe run as a service so it should be more protected from the OS to be killed.
Try my apps and games!

TrackMe GPS/CellID tracking tool that records your positions and display them in realtime (or recorded trips) on Google Earth and GM. Available for Android,WP7 and WM
Distant Galaxies Classic space shooter game. Available for WP7 and WM,Xbox,PC
CatchMe Know how far is another phone and what direction you need to follow to reach it with no internet connection. Available on WM

Please if you like my software. A good motivation for development and updates! Thanks!

 
Post Reply+
Tags
cell id, gps, tracking
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...