Search in sources :

Example 11 with GCM

use of com.kickstarter.models.pushdata.GCM in project android-oss by kickstarter.

the class DebugPushNotificationsView method simulateFriendBackingButtonClick.

@OnClick(R.id.simulate_friend_backing_button)
public void simulateFriendBackingButtonClick() {
    final GCM gcm = GCM.builder().title("Check it out").alert("Christopher Wright backed SKULL GRAPHIC TEE.").build();
    final Activity activity = Activity.builder().category(com.kickstarter.models.Activity.CATEGORY_BACKING).id(1).projectId(PROJECT_ID).projectPhoto(PROJECT_PHOTO).build();
    final PushNotificationEnvelope envelope = PushNotificationEnvelope.builder().activity(activity).gcm(gcm).build();
    pushNotifications.add(envelope);
}
Also used : GCM(com.kickstarter.models.pushdata.GCM) PushNotificationEnvelope(com.kickstarter.services.apiresponses.PushNotificationEnvelope) Activity(com.kickstarter.models.pushdata.Activity) OnClick(butterknife.OnClick)

Example 12 with GCM

use of com.kickstarter.models.pushdata.GCM in project android-oss by kickstarter.

the class DebugPushNotificationsView method simulateProjectUpdateButtonClick.

@OnClick(R.id.simulate_project_update_button)
public void simulateProjectUpdateButtonClick() {
    final GCM gcm = GCM.builder().title("News from Taylor Moore").alert("Update #1 posted by SKULL GRAPHIC TEE.").build();
    final Activity activity = Activity.builder().category(com.kickstarter.models.Activity.CATEGORY_UPDATE).id(7).projectId(PROJECT_ID).projectPhoto(PROJECT_PHOTO).updateId(1033848L).build();
    final PushNotificationEnvelope envelope = PushNotificationEnvelope.builder().activity(activity).gcm(gcm).build();
    pushNotifications.add(envelope);
}
Also used : GCM(com.kickstarter.models.pushdata.GCM) PushNotificationEnvelope(com.kickstarter.services.apiresponses.PushNotificationEnvelope) Activity(com.kickstarter.models.pushdata.Activity) OnClick(butterknife.OnClick)

Example 13 with GCM

use of com.kickstarter.models.pushdata.GCM in project android-oss by kickstarter.

the class DebugPushNotificationsView method simulateFriendFollowButtonClick.

@OnClick(R.id.simulate_friend_follow_button)
public void simulateFriendFollowButtonClick() {
    final GCM gcm = GCM.builder().title("You're in good company").alert("Christopher Wright is following you on Kickstarter!").build();
    final Activity activity = Activity.builder().category(com.kickstarter.models.Activity.CATEGORY_FOLLOW).id(2).userPhoto(USER_PHOTO).build();
    final PushNotificationEnvelope envelope = PushNotificationEnvelope.builder().activity(activity).gcm(gcm).build();
    pushNotifications.add(envelope);
}
Also used : GCM(com.kickstarter.models.pushdata.GCM) PushNotificationEnvelope(com.kickstarter.services.apiresponses.PushNotificationEnvelope) Activity(com.kickstarter.models.pushdata.Activity) OnClick(butterknife.OnClick)

Aggregations

GCM (com.kickstarter.models.pushdata.GCM)13 Activity (com.kickstarter.models.pushdata.Activity)10 PushNotificationEnvelope (com.kickstarter.services.apiresponses.PushNotificationEnvelope)9 OnClick (butterknife.OnClick)8 Notification (android.app.Notification)4 ProjectActivity (com.kickstarter.ui.activities.ProjectActivity)3 WebViewActivity (com.kickstarter.ui.activities.WebViewActivity)3 NonNull (android.support.annotation.NonNull)1 NotificationCompat (android.support.v4.app.NotificationCompat)1