Android Open Source - MultiLocation Location Base






From Project

Back to project page MultiLocation.

License

The source code is released under:

Apache License

If you think the Android project MultiLocation 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.example.owner;
//from  w  ww  .  ja v  a2  s  .  c o m
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;


/**
 * ???Bean
 * @author Acer
 *
 */
public class LocationBase {
  
  //private long latitude;//????
  //private long longitude;//???
  LagLng lagLngBean;//?????
  String lastSavingTime;//?????????
  int locationServiceType;//???????  1???GPS??2???NetWork Wifi,3???Network ???????
  
  /*
  public long getLatitude() {
    return latitude;
  }
  public void setLatitude(long latitude) {
    this.latitude = latitude;
  }
  public long getLongitude() {
    return longitude;
  }
  public void setLongitude(long longitude) {
    this.longitude = longitude;
  }
  */
  
  public String getLastSavingTime() {
    return lastSavingTime;
  }
  public LagLng getLagLngBean() {
    return lagLngBean;
  }
  public void setLagLngBean(LagLng lagLngBean) {
    this.lagLngBean = lagLngBean;
  }
  public void setLastSavingTime(String lastSavingTime) {
    this.lastSavingTime = lastSavingTime;
  }
  public int getLocationServiceType() {
    return locationServiceType;
  }
  public void setLocationServiceType(int locationServiceType) {
    this.locationServiceType = locationServiceType;
  }
  
  public static String getCurrentDate(){
    String currentDate = "";
    Date date = new Date(System.currentTimeMillis());
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" ,Locale.CHINA);
    currentDate = format.format(date);
    return currentDate;
  }
}




Java Source Code List

com.example.owner.GPSLocation.java
com.example.owner.LagLng.java
com.example.owner.LocationBase.java
com.example.owner.LocationServiceProvider.java
com.example.owner.LocationService.java
com.example.owner.MainActivity.java
com.example.owner.NetworkLocation.java