Android Open Source - PharmaApp User Model






From Project

Back to project page PharmaApp.

License

The source code is released under:

MIT License

If you think the Android project PharmaApp 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 mobi.pharmaapp.models;
/*from w w w.j a v  a2  s  .  c o  m*/
import com.google.android.maps.GeoPoint;
import mobi.pharmaapp.util.LocalConstants;
import mobi.pharmaapp.util.Location;

/**
 *
 * @author see /AUTHORS
 */
public class UserModel {

    private GeoPoint curLoc;
    private static final UserModel userModel = new UserModel();

    private UserModel() {
        curLoc = LocalConstants.INITIAL_USER_LOCATION;
    }

    public static UserModel getInstance() {
        return userModel;
    }

    public Location getCurrentLocation() {
        return new Location((float) curLoc.getLatitudeE6() / 1000000, (float) curLoc.getLongitudeE6() / 1000000);
    }

    public void setCurrentLocation(GeoPoint l) {
        curLoc = l;
    }

    public void setCurrentLocation(double lat, double lon) {
        curLoc = new GeoPoint((int) (lat * 1000000), (int) (lon * 1000000));
    }
}




Java Source Code List

mobi.pharmaapp.models.DataModel.java
mobi.pharmaapp.models.UserModel.java
mobi.pharmaapp.util.JSONEmergencyPharmacyScraper.java
mobi.pharmaapp.util.JSONPharmacyScraper.java
mobi.pharmaapp.util.LocalConstants.java
mobi.pharmaapp.util.Location.java
mobi.pharmaapp.util.PharmacyAlphComparator.java
mobi.pharmaapp.util.PharmacyComparator.java
mobi.pharmaapp.util.Pharmacy.java
mobi.pharmaapp.view.AboutActivity.java
mobi.pharmaapp.view.DashboardLayout.java
mobi.pharmaapp.view.EmergencyPharmacistsActivity.java
mobi.pharmaapp.view.InfoPopup.java
mobi.pharmaapp.view.LoadDataDialog.java
mobi.pharmaapp.view.LoadEmergencyDataDialog.java
mobi.pharmaapp.view.LocateActivity.java
mobi.pharmaapp.view.MainActivity.java
mobi.pharmaapp.view.MapOverlayItem.java
mobi.pharmaapp.view.PharmacyAdapter.java
mobi.pharmaapp.view.SearchActivity.java