Expo push notification service - react-native

Im trying to send push notification using expo notification service, can anyone give the code for it, how to get the tokens and all the other standard stuff, I have been trying to read the documentation but it is really confusing. The app is already on test flight, Also I don't want to eject.
I don't mind using Firebase, but the app doesn't have a user login pages. I don't mind any other method too.
Thanks for the help

Related

Using Sanity Webhooks in React native application

Hello there my Dev family!
So I am implementing a react native based application with sanity and so far is going great however I am in need of a little of help getting started with the sanity Webhooks as this is actually my first time working with them.
I managed to create an authentication flow using the sanity cms (sign up and login) but I would like to prompt the users into confirming their email through email validation.
Additionally I would like to also use webhooks for push notifications using Sanity.
Is there any react or react native based guides specifically on webhooks using sanity to achieve this??
I’ve tried searching for clear documentation on it and so far nothing as helpful as I’d like

Setting the User Context App Insights for React Native

We have a React Native app and we are logging to App Insights using the "applicationinsights-react-native package", this all works fine in a sense, but we are trying to start using the monitoring side of things which uses a User ID. Now I'm pretty sure that whatever the User ID that the (app insights) package is using for a user ID won't cause too many problems if we kept it, but it won't be right.
The ApplicationInsights class has a setAuthenticatedUserContext method, however the comments seem to refer to cookies suggesting it's a React package re-purposed and this GitHub post https://github.com/microsoft/appcenter-sdk-react-native/issues/503 suggests we can't use it, however the response is for the React Natve AppCenter package which we are not using. We are using App Insights direct.
So I was wondering if there was a way to set our user_Id/User context if we are using App Insights directly from a React Native app?
It looks like setAuthenticatedUserContext does work if you talk to App Insights directly and not theough Appcenter, it's possible that it works through Appcenter now as well, I have not tested so I am not sure.
If you want to check that this ends up as on the App Insighst side, it appears as a property called user_AuthenticatedId.

Send SMS using Twilio in React-Native

I have been researching for many days on how to send sms using Twilio in React-Native. I haven't found a single example that works! I thought this should be simple but apparently not.
Any suggestions?
Twilio developer evangelist here.
While not ReactNative, I wrote a post about how to send SMS messages in React. The idea for ReactNative will be the same though. You don't want to make requests to the Twilio API directly from your application, you'd need to store your credentials in the app somehow and a malicious user could decompile it and abuse your account.
Instead you want to build a server application that sends the messages and make requests to that from your ReactNative application.
Let me know if that helps at all.

React Native Expo Notification

I currently have a project thats being developed with EPXO RN. There is a need for push notifications and alerts in my app especially when the app is backgrounded / foregrounded.
I 've looked at several options and haven't really decided which one to choose yet. However, going through the Expo Notifications API, i've got a questions:
From my understanding there are two ways to send Alerts:
Expo.Notifications.presentLocalNotificationAsync(localNotification)
or
Expo.Notifications.scheduleLocalNotificationAsync(localNotification, schedulingOptions)
POST request to https://exp.host/--/api/v2/push/send using a token after permission has been granted
Can some one explain the difference in between these two?

react native how run code if uninstall app

Is there a way to run code (for example call an api to delete some data automatically) if I delete the app?
To be more specific, to make a call to an api to delete push information if the user delete the app without loging out
According to this post comment:
Sorry, this is not possible. It's not a limitation of React Native - neither Apple or Google give you this metric. You can track your app install numbers in Google Analytics and iTunes Connect, but I believe neither will give you a simple answer either.