Android Open Source - GPA Task






From Project

Back to project page GPA.

License

The source code is released under:

Apache License

If you think the Android project GPA 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.bishal.android.taskmanager.tasks;
/*  ww w .j ava2s.  c  o m*/
import java.io.Serializable;
import android.location.Address;

public class Task implements Serializable {
  
  /**
   * Generated by Eclipse
   */
  private static final long serialVersionUID = 5527258407135652423L;
  
  private long id;
  private String name;
  private boolean complete;
  private String address;
  private double latitude;
  private double longitude;
  
  public Task(String taskName) {
    name = taskName;
  }

  public void setId(long id) {
    this.id = id;
  }

  public long getId() {
    return id;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getName() {
    return name;
  }
  
  public void setComplete(boolean complete) {
    this.complete = complete;
  }

  public boolean isComplete() {
    return complete;
  }

  public void setAddress(String address) {
    this.address = address;
  }
  
/*  public void setTime(String time){
    this.time=time;
  } */
  
  public String getAddress() {
    return address;
  }
  
  public boolean hasAddress() {
    return null != address;
  }

  public void setLatitude(double latitude) {
    this.latitude = latitude;
  }

  public double getLatitude() {
    return latitude;
  }

  public void setLongitude(double longitude) {
    this.longitude = longitude;
  }

  public double getLongitude() {
    return longitude;
  }

  public void toggleComplete() {
    complete = !complete;
  }

  public String toString() {
    return name;
  }

  public void setAddress(Address a) {
    if (null == a) {
      address = null;
      latitude = longitude = 0;
    } else {
      int maxAddressLine = a.getMaxAddressLineIndex();
      StringBuffer sb = new StringBuffer("");
      for (int i=0; i<maxAddressLine; i++) {
        sb.append(a.getAddressLine(i) + " ");
      }
      address = sb.toString();
      latitude = a.getLatitude();
      longitude = a.getLongitude();
    }
  }

  public boolean hasLocation() {
    return (latitude != 0 && longitude != 0);
  }
}




Java Source Code List

com.bishal.android.taskmanager.ACCOUNT_INFO.java
com.bishal.android.taskmanager.ADD_TASK.java
com.bishal.android.taskmanager.AddLocationMapActivity.java
com.bishal.android.taskmanager.AddTaskActivity.java
com.bishal.android.taskmanager.AlarmActivity.java
com.bishal.android.taskmanager.AlertDialogManager.java
com.bishal.android.taskmanager.AndroidAlarmService.java
com.bishal.android.taskmanager.CURRENT_LOCATION.java
com.bishal.android.taskmanager.DB_ADAPTER.java
com.bishal.android.taskmanager.DbHelper.java
com.bishal.android.taskmanager.GPA_HOME.java
com.bishal.android.taskmanager.GPS_FIELD.java
com.bishal.android.taskmanager.GPS_INFO.java
com.bishal.android.taskmanager.LOGIN.java
com.bishal.android.taskmanager.MyAlarmService.java
com.bishal.android.taskmanager.SCHEDULES.java
com.bishal.android.taskmanager.SEARCHING_PLACES.java
com.bishal.android.taskmanager.SIGNUP.java
com.bishal.android.taskmanager.Search_Education.java
com.bishal.android.taskmanager.Search_Hospital.java
com.bishal.android.taskmanager.SpecifyTime.java
com.bishal.android.taskmanager.TaskManagerActivity.java
com.bishal.android.taskmanager.TaskManagerApplication.java
com.bishal.android.taskmanager.ViewTasksActivity.java
com.bishal.android.taskmanager.YourAlarmService.java
com.bishal.android.taskmanager.adapters.TaskListAdapter.java
com.bishal.android.taskmanager.tasks.Task.java
com.bishal.android.taskmanager.tasks.TasksSQLiteOpenHelper.java
com.bishal.android.taskmanager.views.AddressOverlay.java
com.bishal.android.taskmanager.views.TaskListItem.java