diff --git a/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java b/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java index 6aa4ab8..18b6969 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/Amaryllis.java @@ -5,12 +5,12 @@ import android.location.Location; public class Amaryllis extends Application { + private String token = null; private String uid = null; private String password=null; - private String latitude=null; - private String longitude=null; - + private Location location; + public void setUid(String uid) { SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); SharedPreferences.Editor editor = prefData.edit(); @@ -55,47 +55,12 @@ return token; } -// public void setLatitude(String latitude) { -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// SharedPreferences.Editor editor = prefData.edit(); -// editor.putString("latitude", latitude); -// editor.commit(); -// } -// public String getLatitude() { -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// latitude = prefData.getString("latitude",""); -// return latitude; -// } -// -// public void setLongitude(String longitude) { -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// SharedPreferences.Editor editor = prefData.edit(); -// editor.putString("longitude", longitude); -// editor.commit(); -// } -// -// public String getLongitude() { -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// longitude = prefData.getString("longitude","" ); -// return longitude; -// } + public void setLocation(Location loc){ + location=loc; + } -// public void setLocation(Location latitude,Location longitude){ -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// SharedPreferences.Editor editor = prefData.edit(); -// editor.putString("latitude", latitude); -// editor.putFloat("longitude", longitude); -// editor.commit(); -// } - -// public void getLocation(){ -// SharedPreferences prefData = getSharedPreferences("pref_data", MODE_PRIVATE); -// longitude = prefData.getString("longitude","" ); -// return longitude; -// } - - public void getPlayListManager(){ - + public Location getLocation(){ + return location; } }