Android Open Source - GPSTracker Message






From Project

Back to project page GPSTracker.

License

The source code is released under:

MIT License

If you think the Android project GPSTracker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.creyon.gpstracker; 
/*  w  ww.  ja  v a 2 s.  c o m*/
import java.util.HashMap;


/**
 * 
 * Container of the info that will be send to the server. 
 *  
 *  
 * **/

public class Message {

  private Float lat; 
  private Float lng; 
  private String sim;
  
  public HashMap<String,String> toPackage(){
    HashMap<String,String> pack = new HashMap();

    pack.put("lat", Float.toString(this.getLat()));
    pack.put("lng", Float.toString(this.getLng()) );
    pack.put("sim", this.getSim());
      
    return pack;
  }

  public Float getLat() {
    return lat;
  }
  public Message setLat(Float lat) {
    this.lat = lat;
    return this;
  }
  public Float getLng() {
    return lng;
  }
  public Message setLng(Float lng) {
    this.lng = lng;
    return this;
  }
  public String getSim() {
    return sim;
  }
  public Message setSim(String sim) {
    this.sim = sim;
    return this;
  } 
  
  
  
}




Java Source Code List

com.creyon.gpstracker.GlobalData.java
com.creyon.gpstracker.Message.java
com.creyon.gpstracker.StarterActivity.java
com.creyon.gpstracker.Tracker.java
com.creyon.gpstracker.Transport.java
com.creyon.gpstracker.Trigger.java