Android Open Source - GeoTasker Location






From Project

Back to project page GeoTasker.

License

The source code is released under:

GNU General Public License

If you think the Android project GeoTasker 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.fjaviermo.model;
//w ww .j av  a  2 s.  c  o m
import android.util.SparseArray;


public class Location {

  public enum Type { ENTER(1), LEAVE(2), ENTER_LEAVE(3);
  
  private int mValue;
  private static final  SparseArray<Type> mTypesByValue = new SparseArray<Type>();

  static {
    for (Type type : Type.values()) {
      mTypesByValue.put(type.mValue, type);
    }
  }

  private Type(int value) {
    this.mValue = value;
  }

  public int getValue() {
    return mValue;
  }

  public static Type forValue(int value) {
    return mTypesByValue.get(value);
  }
  }
  
  private long mId;
  private long mIdProfile;
  private long mLatitude;
  private long mLongitude;
  private Type mType;
  
  
  public long getId() {
    return mId;
  }
  
  public void setId(long id) {
    mId = id;
  }
  
  public long getIdProfile() {
    return mIdProfile;
  }
  
  public void setIdProfile(long idProfile) {
    mIdProfile = idProfile;
  }

  public long getLatitude() {
    return mLatitude;
  }

  public void setLatitude(long latitude) {
    mLatitude = latitude;
  }

  public long getLongitude() {
    return mLongitude;
  }

  public void setLongitude(long longitude) {
    mLongitude = longitude;
  }

  public Type getType() {
    return mType;
  }

  public void setType(Type type) {
    mType = type;
  }
  
  // Will be used by the ArrayAdapter in the ListView
  @Override
  public String toString() {
    return mLatitude + " , " + mLongitude;
  }
}




Java Source Code List

com.fjaviermo.adapter.ProfileAdapter.java
com.fjaviermo.dao.LocationDataSource.java
com.fjaviermo.dao.ProfilesDataSource.java
com.fjaviermo.database.DatabaseHelper.java
com.fjaviermo.database.LocationSQLiteHelper.java
com.fjaviermo.database.ProfilesSQLiteHelper.java
com.fjaviermo.geotasker.AddProfileDialogFragment.java
com.fjaviermo.geotasker.MainActivity.java
com.fjaviermo.geotasker.ProfileFragment.java
com.fjaviermo.geotasker.ProfileListFragment.java
com.fjaviermo.model.Location.java
com.fjaviermo.model.Profile.java