API - Recent changes to API
http://test.livetrack24.com/wiki/feed.php?feed_type=rss_1&full_content=1&title=API&lang=en
API historyAPI
http://test.livetrack24.com/wiki/index.php?title=API&mode=history_view&lang=en&id=33
<p>
There are currently 3 APIs available to developers:
</p>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/LiveTracking%20API">LiveTracking API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Info%20API">Info API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Upload%20Track%20API">Upload Track API</a>
</li></ul>
2016-01-29T09:42:22+02:00Livetrack24 Livetrack24API
http://test.livetrack24.com/wiki/index.php?title=API&mode=history_view&lang=en&id=567
<p>
There are currently 3 APIs available to developers:
</p>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/LiveTracking%20API">LiveTracking API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Info%20API">Info API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Upload%20Track%20API">Upload Track API</a>
</li></ul>
2012-10-19T22:13:35+03:00Manolis AndreadakisAPI
http://test.livetrack24.com/wiki/index.php?title=API&mode=history_view&lang=en&id=137
<p>
There are currently 3 APIs available to developers:
</p>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/LiveTracking%20API">LiveTracking API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Info%20API">Info API</a>
</li></ul>
<ul>
<li> <a href="http://test.livetrack24.com/wiki/Upload%20Track%20API">Upload Track API</a>
</li></ul>
2012-08-17T16:12:21+03:00Manolis AndreadakisAPI
http://test.livetrack24.com/wiki/index.php?title=API&mode=history_view&lang=en&id=130
<p>
There are 2 ways to add live tracking support to your application.
You cant mix the 2 ways, stick to and use only one of them in your application.
</p>
<p>
Both are using HTTP GET requests to www.livetrack24.com/track.php with specific parameters
By using test.livetrack24.com/track.php instead the tracks go to the test server. Use this while developing/testing.
</p>
<h2>Generic - Sessionless protocol </h2>
<p>
Example URL
</p>
<blockquote><p>
/track.php?leolive=1&client=<a href="http://test.livetrack24.com/wiki/YourProgramName">YourProgramName</a>&v=1&lat=22.3&lon=40.2&alt=23&sog=40&cog=160&tm=1241422845&user=yourusername&pass=yourpass
</p></blockquote>
<h2>Native - Session aware protocol</h2>
<h3>START OF TRACK PACKET</h3>
<blockquote><p>
/track.php?leolive=2&sid=42664778&pid=1&client=<a href="http://test.livetrack24.com/wiki/YourProgramName">YourProgramName</a>&v=1&user=yourusername&pass=yourpass&phone=Nokia 2600c&gps=BT GPS&trk1=4&vtype=16388&vname=vehicle name and model
</p></blockquote>
<h4>PARAMETERS </h4>
<ul>
<li>leolive=2 // 2 means this is the start of track packet
</li><li>sid=42664778 // the session ID , see below on sessionID section for more information
</li><li>pid=1 // the packet numner of this packet, we start with 1 and increase with each packet send either start/end or with GPS data.
</li><li>client=<a href="http://test.livetrack24.com/wiki/YourClientName">YourClientName</a>// fixed value use only alphanumerics no spaces, first Letter of words in capitals
</li><li>user=yourusername // there is no need to have a registered user, the user can input his preferred username on the fly, he will be displayed in black instead of blue if not registered.
</li><li>pass=yourpass
</li><li>v=1 // version of your program you can use free text like 1.4.5
</li><li>trk1=4 // the interval in secs that we will be sending gps points
</li><li>phone=Nokia 2600c // the phone model as it is acquired from a system call
</li><li>&gps=BT GPS // the GPS name , use the string Internal GPS for phones with integrated GPS
</li><li>vname // the brand + name of the vehicle/glider ie Gradient Golden 2 26
</li></ul>
<p>
Values for vtype
</p>
<pre>1=>"Paraglider"
2=>"Flex wing FAI1"
4=>"Rigid wing FAI5"
8=>"Glider"
16=>"Paramotor"
32=>"Trike"
64=>"Powered flight"
128=>"Hot Air Balloon"
</pre>
<p>
</p>
<pre>16385=>"Walk"
16386=>"Run"
16388=>"Bike"
</pre>
<p>
</p>
<pre>16400=>"Hike"
16401=>"Cycle"
16402=>"Mountain Bike"
16403=>"Motorcycle"
</pre>
<p>
</p>
<pre>16500=>"Windsurf"
16501=>"Kitesurf"
16502=>"Sailing"
</pre>
<p>
</p>
<pre>16600=>"Snowboard"
16601=>"Ski"
16602=>"Snowkite"
</pre>
<p>
</p>
<pre>17100=>"Car"
17101=>"4x4 Car"
</pre>
<h3>END OF TRACK PACKET</h3>
<blockquote><p>
/track.php?leolive=3&sid=42664778&pid=453&prid=0
</p></blockquote>
<h4>PARAMETERS</h4>
<ul>
<li> leolive=3 // 3 means this is the end of track packet
</li><li> prid=0 // the status of the user
</li></ul>
<pre>0-> "Everything OK"
1-> "Need retrieve"
2-> "Need some help, nothing broken"
3-> "Need help, maybe something broken"
4-> "HELP, SERIOUS INJURY"
</pre>
<h3>GPS POINT PACKET</h3>
<blockquote><p>
/track.php?leolive=4&sid=42664778&pid=321&lat=22.3&lon=40.2&alt=23&sog=40&cog=160&tm=1241422845
</p></blockquote>
<h4>PARAMETERS</h4>
<ul>
<li>leolive=4 // 4 means this is a gps point
</li><li>lat=22.3 // the latitude in decimal notation, use negative numbers for west
</li><li>lon=40.2 // lon in decimal, use negative numbers for south
</li><li>alt=23 // altitude in meters above the MSL (not the geoid if it is possible) , no decimals
</li><li>sog=40 // speed over ground in km/h no decimals
</li><li>cog=160 // course over ground in degrees 0-360, no decimals
</li><li>tm=1241422845 // the unixt timestamp in GMT of the GPS time, not the phone's time.
</li></ul>
<h3>Info on sessionID </h3>
<p>
The "sid" (sessionID) parameter uniquely identifies a single track , it must be the same in all packets
</p>
<h4>Random <a href="http://test.livetrack24.com/wiki/SessionID">SessionID</a></h4>
<p>
Use a 4 byte unsigned random int, the leftmost bit ( 0x80000000 ) MUST be set to 0 so you must do a sessionID & 0x7fffffff
</p>
<h4>Setting the userID inside sessionID</h4>
<p>
If the user has an account on the server then the sessionID must be constructed in the following way to contain the userID
</p>
<p>
First of all your application must get the userID based on the username and password of the user. The url to verify user accounts and get back the userID is
</p>
<p>
http://www.livetrack24.com/client.php?op=login&user=username&pass=pass
</p>
<p>
The username and password are case INSENSITIVE, because on mobile devices it is not easy for all users to enter the correct case.
</p>
<p>
The result of the page is an integer, 0 if userdata are incorrect, or else the userID of the user
</p>
<p>
Here is a sample code in Java to construct a sessionID from a userID
</p>
<pre>Random a= new Random( System.currentTimeMillis() );
int rnd=a.nextInt();
// we make an int with leftmost bit=1 ,
// the next 7 bits random
// (so that the same userID can have multiple active sessions)
// and the next 3 bytes the userID
rnd=( rnd & 0x7F000000 ) | ( userID & 0x00ffffff) | 0x80000000;
</pre>
<pre>
</pre>2012-08-17T15:54:04+03:00Manolis AndreadakisAPI
http://test.livetrack24.com/wiki/index.php?title=API&mode=history_view&lang=en&id=127
<p>
There are 2 ways to add live tracking support to your application.
You cant mix the 2 ways, stick to and use only one of them in your application.
</p>
<p>
Both are using HTTP GET requests to www.livetrack24.com/track.php with specific parameters
By using test.livetrack24.com/track.php instead the tracks go to the test server. Use this while developing/testing.
</p>
<h2>Generic - Sessionless protocol </h2>
<p>
Example URL
</p>
<blockquote><p>
/track.php?leolive=1&client=<a href="http://test.livetrack24.com/wiki/YourProgramName">YourProgramName</a>&v=1&lat=22.3&lon=40.2&alt=23&sog=40&cog=160&tm=1241422845&user=yourusername&pass=yourpass
</p></blockquote>
<h2>Native - Session aware protocol</h2>
<h3>START OF TRACK PACKET</h3>
<blockquote><p>
/track.php?leolive=2&sid=42664778&pid=1&client=<a href="http://test.livetrack24.com/wiki/YourProgramName">YourProgramName</a>&v=1&user=yourusername&pass=yourpass&phone=Nokia 2600c&gps=BT GPS&trk1=4&vtype=16388&vname=vehicle name and model
</p></blockquote>
<h4>PARAMETERS </h4>
<ul>
<li>leolive=2 // 2 means this is the start of track packet
</li><li>sid=42664778 // the session ID , see below on sessionID section for more information
</li><li>pid=1 // the packet numner of this packet, we start with 1 and increase with each packet send either start/end or with GPS data.
</li><li>client=<a href="http://test.livetrack24.com/wiki/YourClientName">YourClientName</a>// fixed value use only alphanumerics no spaces, first Letter of words in capitals
</li><li>user=yourusername // there is no need to have a registered user, the user can input his preferred username on the fly, he will be displayed in black instead of blue if not registered.
</li><li>pass=yourpass
</li><li>v=1 // version of your program you can use free text like 1.4.5
</li><li>trk1=4 // the interval in secs that we will be sending gps points
</li><li>phone=Nokia 2600c // the phone model as it is acquired from a system call
</li><li>&gps=BT GPS // the GPS name , use the string Internal GPS for phones with integrated GPS
</li><li>vname // the brand + name of the vehicle/glider ie Gradient Golden 2 26
</li></ul>
<p>
Values for vtype
</p>
<pre>1=>"Paraglider"
2=>"Flex wing FAI1"
4=>"Rigid wing FAI5"
8=>"Glider"
16=>"Paramotor"
32=>"Trike"
64=>"Powered flight"
128=>"Hot Air Balloon"
</pre>
<p>
</p>
<pre>16385=>"Walk"
16386=>"Run"
16388=>"Bike"
</pre>
<p>
</p>
<pre>16400=>"Hike"
16401=>"Cycle"
16402=>"Mountain Bike"
16403=>"Motorcycle"
</pre>
<p>
</p>
<pre>16500=>"Windsurf"
16501=>"Kitesurf"
16502=>"Sailing"
</pre>
<p>
</p>
<pre>16600=>"Snowboard"
16601=>"Ski"
16602=>"Snowkite"
</pre>
<p>
</p>
<pre>17100=>"Car"
17101=>"4x4 Car"
</pre>
<h3>END OF TRACK PACKET</h3>
<blockquote><p>
/track.php?leolive=3&sid=42664778&pid=453&prid=0
</p></blockquote>
<h4>PARAMETERS</h4>
<ul>
<li> leolive=3 // 3 means this is the end of track packet
</li><li> prid=0 // the status of the user
</li></ul>
<pre>0-> "Everything OK"
1-> "Need retrieve"
2-> "Need some help, nothing broken"
3-> "Need help, maybe something broken"
4-> "HELP, SERIOUS INJURY"
</pre>
<h3>GPS POINT PACKET</h3>
<blockquote><p>
/track.php?leolive=4&sid=42664778&pid=321&lat=22.3&lon=40.2&alt=23&sog=40&cog=160&tm=1241422845
</p></blockquote>
<h4>PARAMETERS</h4>
<ul>
<li>leolive=4 // 4 means this is a gps point
</li><li>lat=22.3 // the latitude in decimal notation, use negative numbers for west
</li><li>lon=40.2 // lon in decimal, use negative numbers for south
</li><li>alt=23 // altitude in meters above the MSL (not the geoid if it is possible) , no decimals
</li><li>sog=40 // speed over ground in km/h no decimals
</li><li>cog=160 // course over ground in degrees 0-360, no decimals
</li><li>tm=1241422845 // the unixt timestamp in GMT of the GPS time, not the phone's time.
</li></ul>
<h3>Info on sessionID </h3>
<p>
The "sid" (sessionID) parameter uniquely identifies a single track , it must be the same in all packets
</p>
<h4>Random <a href="http://test.livetrack24.com/wiki/SessionID">SessionID</a></h4>
<p>
Use a 4 byte unsigned random int, the leftmost bit ( 0x80000000 ) MUST be set to 0 so you must do a sessionID & 0x7fffffff
</p>
<h4>Setting the userID inside sessionID</h4>
<p>
If the user has an account on the server then the sessionID must be constructed in the following way to contain the userID
</p>
<p>
First of all your application must get the userID based on the username and password of the user. The url to verify user accounts and get back the userID is
</p>
<p>
http://www.livetrack24.com/client.php?op=login&user=username&pass=pass
</p>
<p>
The username and password are case INSENSITIVE, because on mobile devices it is not easy for all users to enter the correct case.
</p>
<p>
The result of the page is an integer, 0 if userdata are incorrect, or else the userID of the user
</p>
<p>
Here is a sample code in Java to construct a sessionID from a userID
</p>
<pre>Random a= new Random( System.currentTimeMillis() );
int rnd=a.nextInt();
// we make an int with leftmost bit=1 ,
// the next 7 bits random
// (so that the same userID can have multiple active sessions)
// and the next 3 bytes the userID
rnd=( rnd & 0x7F000000 ) | ( userID & 0x00ffffff) | 0x80000000;
</pre>
<pre>
</pre>2012-08-17T15:53:31+03:00Manolis Andreadakis