use of com.example.c4q.capstone.utils.currentuser.UserEventListener in project Grupp by tmoronta1208.
the class UserProfileActivity method pushEventInviteNotifications.
public void pushEventInviteNotifications() {
final Context mContext = getApplicationContext();
CurrentUserUtility currentUserUtility = new CurrentUserUtility();
currentUserUtility.getSingleEventInviteList(CurrentUser.userID, new UserEventListener() {
@Override
public void getUserEventList(Map<String, UserEvent> userEventMap) {
if (userEventMap != null) {
Log.d(TAG, "notifications not null");
for (String s : userEventMap.keySet()) {
String eventName = userEventMap.get(s).getEvent_name();
String userName = userEventMap.get(s).getEvent_organizer_full_name();
String title = userName;
String desc = "You're invited to " + eventName + "!";
new InviteNotifications(title, desc, getApplicationContext(), userEventMap.get(s).getEvent_id());
}
} else {
Log.d(TAG, "notifications null");
}
}
});
//
}
Aggregations