1st version that works
This commit is contained in:
24
libSafeMobile/src/main/java/com/safemobile/lib/GPSmsg.java
Normal file
24
libSafeMobile/src/main/java/com/safemobile/lib/GPSmsg.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.safemobile.lib;
|
||||
|
||||
public class GPSmsg extends TCPmsg {
|
||||
|
||||
public GPS gpsValue;
|
||||
public static int count=0;
|
||||
public GPSmsg(TCPmsg tcp)
|
||||
{
|
||||
super(tcp);
|
||||
String date4parsing = super.data;
|
||||
//SM.Debug("SMS date4parsing:"+date4parsing);
|
||||
String[] tempVeh = date4parsing.split("#");
|
||||
gpsValue = new GPS();
|
||||
gpsValue.imei = Long.parseLong(tempVeh[0]);
|
||||
gpsValue.lat = Double.parseDouble(tempVeh[3]);
|
||||
gpsValue.lng = Double.parseDouble(tempVeh[4]);
|
||||
gpsValue.speed = Integer.parseInt(tempVeh[2]);
|
||||
gpsValue.timeGMT = Long.parseLong(tempVeh[1]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user