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.
Related
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
I've recently decided to try and make a universal app with expo supporting ios, android and web altogether.
I knew that there would be many hick ups along the way.. but I found the biggest problem from the start.
I can see that there are few options as where to store the access token for apps such as secure store or asyncStorage, I just simply can't find a way to work with cookies or any client side store to put in the access-token.
As my app should have the stay logged in feature essentially, this will be a critical problem for the web client.
Does anybody know a good workaround this matter, or is there a way to keep the users logged in from the server side using the device / ip detail..?
Please enlighten me guys!
The web support is available in asyncStorage since v1.9.0.
So you can use it in recent versions of asyncStorage.
I've managed to do this with AsyncStorage.
import AsyncStorage from '#react-native-community/async-storage';
/// Then inside your component make an asynchronous set
await AsyncStorage.setItem(['tokenName', tokenValue]);
I have tried with using Web view and having a Node server with paypal-rest-sdk as backend.
The flow seems to be a work around. Is there any way to directly integrate the Paypal with React Native code without any server calls or web views.
This isn't really a React question -- if no server is used, then you would be doing a client-only HTML/JS integration such as this one: https://developer.paypal.com/demo/checkout/#/pattern/client
That's possible to do. It would all be happening in a full mobile web experience, which then becomes the PayPal Checkout.
If your question was whether it's technically possible to do "server"-style REST API calls from a purely native React app, please put that thought out of your mind. Your 'secret' API key should never be in the possession of a client-side App.
I am trying to open an external application from a react native application. I passed the URL and it calls the application but it shows loading screen only and doesn't show the application.
Could anyone suggest the possible reason?
I tried using react-native-app-link which seems to be outdated and not useful. Then I tried linking.openurl(WhatsApp://) but it didn't work as well
Linking.openURL("whatsapp://app")
The external app should open.
if you would like to open only Whatsapp through your application then
refer https://faq.whatsapp.com/en/iphone/23559013
thank,
hope this helps you
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.