-1

私は毎週ユーザ通知を行うアプリを持っています。いいえ、保留中の予定の残りの時間を取得したいと思います。私はIDをデータベースに保留していますが、保留中のインテント時間を取得する方法はわかりません。Android:保留中のインテント残り時間を取得する方法

私はこのような繰り返しを設定します。

Intent notificationIntent = NotificationReciever.newIntent(this, plant.getPendingIntentID(day), 
          plant.getName() + " Čas: " + mHours + ":" + mMinutes); 

    PendingIntent pendingIntent = 
          PendingIntent.getBroadcast(getApplicationContext(), plant.getPendingIntentID(day), notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); 

    AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); 
        alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, date.getTimeInMillis(), 24 * 60 * 60 * 1000, pendingIntent); 

答えて

0

私は通知がトリガーされます正確な日時を保存する場合、私はいつも残り時間を計算できることを考え出しました。

関連する問題