TestServiceの全体的なリファクタリング #28

Merged
asura146 merged 73 commits from improve/refactor_service into main 2024-07-12 02:17:26 +00:00
Showing only changes of commit e9c10fc266 - Show all commits

View File

@ -126,8 +126,6 @@ public class TestService extends Service {
String IdPref = sharedPreferences.getString("ID", null);//アプリに記録されているIDの取得
db = FirebaseFirestore.getInstance();//Firebaseとの紐づけ
DocumentReference isReported = db.collection("status").document(IdPref);//更新するドキュメントとの紐づけ
Map<String, Boolean> DEFAULT_ITEM = new HashMap<>();//mapの宣言
DEFAULT_ITEM.put("isReported", false);
//isReportedをfalseに更新
isReported.update("isReported", false).addOnSuccessListener(unused -> Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e));
}