You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitSplashScreen.hideAsync();}prepare();// notification recieved, append to local arraynotificationListener.current=Notifications.addNotificationReceivedListener((notification)=>{console.log("addNotificationReceivedListener",notification);dispatch(pushRecieved(notification));});// notification response recievedresponseListener.current=Notifications.addNotificationResponseReceivedListener((response)=>{console.log("addNotificationResponseReceivedListener",JSON.stringify(response,null,4));// get the notification response data// TODO define this payload formatconstresponseData={pushIdent: response.notification.request.content.data.pushIdent,pushId: response.notification.request.content.data.pushId,actionIdentifier: response.actionIdentifier,categoryIdentifier: response.notification.request.content.categoryIdentifier,responseText: null,};// asttach user text is definedif(response.userText){responseData.responseText=response.userText;}letfoundNotificatonCategory=false;for(constindexinNotificationDefinitions){constnotificationCategory=NotificationDefinitions[index];if(index==responseData.categoryIdentifier){foundNotificatonCategory=notificationCategory;}}// send non-default responses if enabled for this type of notificationif(response.actionIdentifier==Notifications.DEFAULT_ACTION_IDENTIFIER){if(foundNotificatonCategory&&foundNotificatonCategory.sendDefaultAction){dispatch(setPushResponse(responseData));}}else{dispatch(setPushResponse(responseData));}// dismiss the notificaqtion when it's tappedNotifications.dismissNotificationAsync(response.notification.request.identifier);});
The text was updated successfully, but these errors were encountered:
PushMeApp/App.js
Line 236 in 7bb04d3
The text was updated successfully, but these errors were encountered: