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 85811b7bd0 - Show all commits

View File

@ -49,8 +49,6 @@ public class TestService extends Service {
} }
} }
FirebaseFirestore db;
public static final String TAG = "InspirationQuote"; public static final String TAG = "InspirationQuote";
private static final String CHANNEL_ID = "child_guard_emergency"; private static final String CHANNEL_ID = "child_guard_emergency";
private static final int REQUEST_CODE = 100; private static final int REQUEST_CODE = 100;
@ -195,7 +193,7 @@ public class TestService extends Service {
* 通報フラグをリセットする * 通報フラグをリセットする
*/ */
private void resetReported() { private void resetReported() {
db = FirebaseFirestore.getInstance();//Firebaseとの紐づけ FirebaseFirestore db = FirebaseFirestore.getInstance();//Firebaseとの紐づけ
DocumentReference isReported = db.collection("status").document(this.userId); DocumentReference isReported = db.collection("status").document(this.userId);
//isReportedをfalseに更新 //isReportedをfalseに更新
isReported.update("isReported", false).addOnSuccessListener(unused -> isReported.update("isReported", false).addOnSuccessListener(unused ->