use of com.example.c4q.capstone.userinterface.alerts.InviteNotifications 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");
}
}
});
//
}
use of com.example.c4q.capstone.userinterface.alerts.InviteNotifications in project Grupp by tmoronta1208.
the class UserProfileActivity method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.edit_profile_menu_item:
startActivity(new Intent(UserProfileActivity.this, OnBoardActivity.class));
break;
case R.id.edit_preferences_menu_item:
// TODO
InviteNotifications inviteNotifications = new InviteNotifications(getApplicationContext());
inviteNotifications.showNotificationVoteComplete();
startActivity(new Intent(UserProfileActivity.this, TempUserActivity.class));
break;
case R.id.add_friends_menu_item:
startActivity(new Intent(UserProfileActivity.this, UserSearchActivity.class));
break;
case R.id.sign_out:
mAuth.signOut();
AuthUI.getInstance().signOut(UserProfileActivity.this).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
}
});
// TODO
break;
}
return super.onOptionsItemSelected(item);
}
Aggregations