react native how run code if uninstall app - react-native

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.

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

Using Expo's Google authentication integration vs react-native-google-signin

I'm building my first React Native app and I want to have Google signin.
I first went down the path of trying to integrate the library react-native-google-signin - seemed like a promising library! But then very quickly I got mired in problems with my development environment and figuring out Expo development builds. I never quite got it working.
Then I tried Expo's Google authentication integration, and I've gotten that working, at least on web and iOS via Expo. It returns the logged-in user's Google access_token, which I think is all I'm needing (I currently don't need access to any other of the user's Google data).
My main question is: what are the drawbacks or limitations of using Expo's authentication option, or, why would I want to use the react-native-google-signin library despite its much greater added complexity? Is the Expo option going to break when I try to officially turn my app into a native iOS app?

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.

Expo push notification service

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

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?