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 1d01e217b6 - Show all commits

View File

@ -138,6 +138,13 @@ public class TestService extends Service {
Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e)); Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e));
} }
/**
* 通知をタップしたときにアプリを起動するPendingIntentを取得
* @param context コンテキスト
* @param requestCode リクエストコード
* @param flags フラグ
* @return PendingIntent
*/
private PendingIntent getPendingIntent(Context context, int requestCode, int flags) { private PendingIntent getPendingIntent(Context context, int requestCode, int flags) {
Intent intent = new Intent(context, MainActivity.class); Intent intent = new Intent(context, MainActivity.class);
intent.setAction("OPEN_ACTIVITY"); intent.setAction("OPEN_ACTIVITY");