-updated push notification handling to sync when application is brought to foreground