Merge branch 'master' of http://nitta-lab-www.is.konan-u.ac.jp/gitbucket/git/nitta-lab-2019/CosmosClient into StoreLocationClass
commit 009756f6e00c6c6c96e47584f79752af47c20084
2 parents f632681 + f37dc4b
t-tai authored on 7 Nov 2019
Showing 3 changed files
View
9
app/src/main/java/com/example/cosmosclient/app/Cosmos.java
import com.example.cosmosclient.entities.AreaInformation;
import com.example.cosmosclient.entities.Group;
import android.content.SharedPreferences;
 
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
 
public class Cosmos extends Application {
private Group curGroup=null;
private HashMap<String, Group> groups = new HashMap<>();
private String uId=null;
private HashMap<Integer, AreaInformation> areaInfo = new HashMap<>();
private ArrayList<Integer> areaInfoKey= new ArrayList<>();
private String TAG = Cosmos.class.getSimpleName();
 
public Cosmos() {
super();
public AreaInformation getAreaInfo(int areaId){
return areaInfo.get(areaId);
}
 
public ArrayList<Integer> AreaInfoGetKey(){
for(int key : areaInfo.keySet()){
areaInfoKey.add(key);
}
return areaInfoKey;
}
 
}
View
7
app/src/main/java/com/example/cosmosclient/services/CosmosBackgroundService.java
public void onLocationChanged(Location location) {
// Log.d(TAG, "onLocationChanged");
Log.d(TAG, "lat:" + location.getLatitude());
Log.d(TAG, "lon:" + location.getLongitude());
updateAreaInformation(location);
 
 
}
 
@Override
settingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(settingsIntent);
}
 
private void updateAreaInformation(Location location){
 
}
 
}
View
8
app/src/main/java/com/example/cosmosclient/views/SigninActivity.java
Button ForgotPasswordButton = findViewById(R.id.ForgotPasswordButton);
 
Cosmos app = (Cosmos) getApplication();
String account = app.getuId();
String token = app.getToken();
 
// //ログアウトしていない場合singnin画面を表示しない
// if(token != ""){
// Intent intent = new Intent(getApplication(), GroupListActivity.class);
// startActivity(intent);
// finish();
// }
 
// 空チェック
if (account != null && account.length() > 0) {
// 保存済の情報をログインID欄に設定