use of com.kickstarter.models.pushdata.GCM in project android-oss by kickstarter.
the class PushNotifications method displayNotificationFromErroredPledge.
private void displayNotificationFromErroredPledge(@NonNull final PushNotificationEnvelope envelope) {
final GCM gcm = envelope.gcm();
final PushNotificationEnvelope.ErroredPledge erroredPledge = envelope.erroredPledge();
if (erroredPledge == null) {
return;
}
final Long projectId = erroredPledge.projectId();
final Intent projectIntent = projectIntent(envelope, ObjectUtils.toString(projectId)).putExtra(IntentKey.EXPAND_PLEDGE_SHEET, true);
final Notification notification = notificationBuilder(gcm.title(), gcm.alert(), CHANNEL_PROJECT_REMINDER).setContentIntent(projectContentIntent(envelope, projectIntent)).build();
notificationManager().notify(envelope.signature(), notification);
}
use of com.kickstarter.models.pushdata.GCM in project android-oss by kickstarter.
the class PushNotifications method displayNotificationFromSurveyResponseActivity.
private void displayNotificationFromSurveyResponseActivity(@NonNull final PushNotificationEnvelope envelope, @NonNull final SurveyResponse surveyResponse) {
final GCM gcm = envelope.gcm();
final PushNotificationEnvelope.Survey survey = envelope.survey();
if (survey == null) {
return;
}
final Notification notification = notificationBuilder(gcm.title(), gcm.alert(), CHANNEL_SURVEY).setContentIntent(surveyResponseContentIntent(envelope, surveyResponse)).build();
notificationManager().notify(envelope.signature(), notification);
}
Aggregations