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 37dd6b630a - Show all commits

View File

@ -123,7 +123,8 @@ public class TestService extends Service {
db = FirebaseFirestore.getInstance();//Firebaseとの紐づけ 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 -> Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e)); isReported.update("isReported", false).addOnSuccessListener(unused ->
Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e));
} }
public void NotificationSetting() {//通知に関する設定の処理を行うメソッド public void NotificationSetting() {//通知に関する設定の処理を行うメソッド
@ -134,7 +135,6 @@ public class TestService extends Service {
NotificationManager notificationManager = getSystemService(NotificationManager.class); NotificationManager notificationManager = getSystemService(NotificationManager.class);
notificationManager.createNotificationChannel(channel); notificationManager.createNotificationChannel(channel);
} }
public void Notification(Context context) {//実際に通知を行うメソッド public void Notification(Context context) {//実際に通知を行うメソッド