Get Google Click ID (gclid and msclkid) inside React Native - react-native

Inside the web today, we are getting gclid and msclkid when user get's on the lending page from the google ad, with
const { gclid, msclkid } = queryString.parse(location.search);
And we are storing it inside the DB,
Now we want to do the same inside our mobile app too, when user intall the app from the ad we want to get those 2 values and store them inside DB
We are using Expo EAS inside the mobile project righ now, but I'm not that experianced with this marketign tools
Anyone know how this can be done?
Thanks!
I've tried getting it inside the product thru firebase analytics but it seems it's not working or I'm doing it wrong, I also tried this lib https://www.npmjs.com/package/react-native-advertising-id but it's outdated and it does not seem to pull data I need

Related

Shopify app that can use and save camera data

I would like to build a Shopify app that can take pictures of the customer using the selfie camera, save them to a customer profile, and allow for guest checkout. I know this is partly possible because this app - https://www.esenca.app is able to achieve the camera functionality component.
Regarding the fine details, how would I create a Shopify app that can do this?
First you create a mobile App using your Flutter or React Native library (or whatever turns your mobile phone crank) with camera access. Ensure your App can take a picture and store it.
Second you would implement the Shopify oAuth pattern into your App, asking for customer permissions, so the merchant could choose to install this App in their store.
Third you would code up an extension in your App that displays this picture in the Customer account section of the App.
Fourth, clean up all the loose ends and profit from your adventure!

How to publish LocalScreenShare tracks from IOS to Web browser in React-Native using Twilio

I want to integrate Screen Share feature in my react-native application in which I am using Twilio for video communication. In Web we are able to achieve this by following these steps.
1 : We get the media device stream using
navigator.mediaDevices.getDisplayMedia({
video: true,
});
2 : Then we get the first stream tracks using
const newScreenTrack = first(stream.getVideoTracks());
3 : After that we set this newScreenTrack in some useState
const localScreenTrack = new TwilioVideo.LocalVideoTrack(
newScreenTrack
);
4 : After that we first unpublish the previous tracks and publish the new tracks using
videoRoom.localParticipant.publishTrack(newScreenTrack, {
name: "screen_share",
});
5 : And finally we pass these tracks in our ScreenShare component and render these tracks to View the screenShare from remote Participant.
I need to do the same thing in my react-native application as well. Where if localParticipant ask for screenShare permission to another participant. Participant will accept the permission and able to publish the localScreenShare tracks.
If anyone know this please help me in this. It would be really helpful. Thank you
I think this is an issue with the react-native-twilio-video-webrtc package. It seems that, as you discovered in this issue, that screen sharing was previously a feature of the library and it was removed as part of a refactor.
Sadly, the library does more work than the underlying Twilio libraries to look after the video and audio tracks. The Twilio library is built to be able to publish more than one track at a time, however this React Native library allows you to publish a single audio track and a single video track using the camera at a time.
In order to add screen sharing, you can either support pull requests like this one or refactor the library to separate getting access to the camera from publishing a video track, so that you can publish multiple video tracks at a time, including screen tracks.

Pass data between react-native and android

I need to pass data from react-native to android.
Within react-native, once the user is logged in, I need to get the user ID and store it in memory.
Next time when the app starts, I need to access that user ID from android code and supply it for an sdk for some data processing. I tried https://www.npmjs.com/package/react-native-default-preference but couldn't get the value added from react-native from android side.
And when I was trying to configure react-native default preferences I got the above error image
Try to delete new RNDefaultPreferencePackage() from returned package array from MainApplication.java in getPackages method
should be something like this

How can I get a Referral code to be populated directly on friends first App launch(i.e. during signup) in react native?

How can I get a Referral code to be populated directly on friends first App launch,i.e. during signup?
You could create a deep link for your application and add a referral code into link. Usually, deep linking looks something like this:
referralapp://some_referral_code
So if a user opens the app by this link, you'll be able to retrieve some_referral_code using React Native linking library. There is an example article on Medium.

Google Places Web Api

I am working on a project to create a Uber clone. I will need to have a text input which will list predicted addresses like in the actual Uber app when user types in the text input. Once user selects the location, a map will be automatically updated.
Can I achieve this using the Google places web api alone, without touching native code? I know this can be achieved using react native google places (which needs to touch native code) but I am not comfortable toying with native codes.
If possible to achieve using Google places web api, anyone can share samples of how this is done? Tutorials online only show how to set markers for certain types only eg hotels which is not what I want to achieve. I m not sure what is the 'type' I should set when using Google places web api.
I use react native init to initialize my react native app
Thanks