Google Places Web Api - react-native

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

Related

React native share:-how to use share functionality with different message for different app

I have a requirement in share functionality in which i want to share different different messages for facebook twitter and other apps. But in react native share i have only one message variable in which we pass the data. Can anyone help me about how to pass different message in different apps. Like how i can identify that facebook is selected or twitter is selecr or other app is selected and then send specific message to. That app in react native.
Please help me i am new to react native. It will be a great help.

React Native Multiple Images Picker

The problem
So, I am developing a react native application and I am facing the callenge of selecting multiple images from the user gallery. Just like apps like WhatsApp, Telegram, Twitter and even Reddit do. So with that in mind, i tried to use launchImageLibraryAsync from expo-image-picker but, as specified in their documentation, the "multiple selecion" of images is only supported on the web.
What I have thinked of
So, based on several searches, it seemed like i had to build my own "Gallery". To do this, so far i've tried to use #react-native-community/cameraroll and expo-media-library, but both of them requires that we pass the first property to the getPhotos (for #react-native-community/cameraroll) or to the getAssetsAsync (for expo-media-library) functions, which defines the first items to be fetched. This is a problem because I do not want to fetch like 20 items and then, when the user reaches the end of the list, it fetches more 20 items. I need something like this (this example is from Telegram). You can see that the app never stops me from scrolling, it goes all the way through my entire gallery.
What would also be nice
If you use reddit mobile, you can see that you can also select multiple photos using the several Apps like Google Photos, Files, Google Drive and so on.
This would be even nicer because I wouldn't need to implement a custom made Picker. Do you guys know how could I implement this?
OBS: I am using Expo with Bare Workflow, so I can use just about any package. I also opened a discussion at the Expo repo about it. You can check it here: https://github.com/expo/expo/discussions/15210.
Thank you in advance :)
I have been using this package called expo-images-picker check it out. It has similar function to what you need. It works in Mobile as well.
Link here

What is the recommended way to build "Stripe-subscriptions-checkout" inside app using React Native?

I am following this doc https://stripe.com/docs/billing/subscriptions/checkout.
Is there any way, I can use directly some components from https://github.com/stripe/stripe-react-native or I have to go with Webview only?
You need to stitch together a few different guides from the Stripe docs:
a/ Subscription creation steps happen on your backend, so you perform steps 1 through 5 here: https://stripe.com/docs/billing/subscriptions/elements#install-setup
The rest of that guide uses Stripe Elements, which you won't be using, you'll be substituting it out for ReactNative.
By step 5 in that doc, you'll have created a Subscription (in status "incomplete" and you'll need to pay its first PaymentIntent to move the Subscription to status: "active")
b/ Integrate CardField or CardForm in ReactNative by following this guide: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=custom
This doc shows you server-side snippets for a one-time payment, ignore those as you already have done step 1/.
Integrate the ReactNative client-side code from that guide and at step 4/, you'll confirm the PaymentIntent's client_secret from a/ above.
Stripe Checkout (Your first link) is a very different thing to Stripe React Native (The library you use to add payment UI elements within your application).
Stripe Checkout:
Is a hosted website (at checkout.stripe.com) your customer gets redirected to to complete a purchase by entering their address, payment method data, etc.
Is somewhat, but not very customizable.
Stripe React Native:
Is one of Stripe's SDKs offering UI elements and functions in your native code
Offers you elements to add to your application
These two methods to integrate Stripe are different to each other, Checkout cannot be shown inside your app, you'll need to use a WebView.
In your case, I recommend you follow this guide instead of the Checkout one to use the React Native elements and SDK.

Website replicating in React Native, WebView vs code, notifications needed

first time asking here as i am looking for some guidance before i start coding.
I have been developing websites mostly in PHP/MySQL/Jquery for years. As I was requested to port a website to an app, I selected React Native in order not to learn 2 different languages for IOS-Android.
I subscribed to some react native lessons, as I found it very clear and fun to follow, and it indeed is.
But here I am finding that to replicate the website is a truly difficult task for me. A temporary version exists at https://app.thallo.care/app.php?language=en (view on mobile if you like). There are many fixed positioned things and floating menus that i cannot easily program on react native.
I tried webview, it works wonderfully, but i am not positive i will be able to implement notifications the way i want to, or custom app styling with inject javascript i am unsure it will work.
The only app difference comparing to the desktop version, is that the user will receive notifications. The website will have a calendar where he will add events, and i need to send notifications to the user device on the event datetime that he has set.
Now the question... Should i use webview and manage notifications on a third party app like amazon SNS or anything else, will i get per-user notifications on events with webview? (I dont need to open a specific page on the app, but it would be nice). Or should i insist on react native coding and try to replicate as much as possible, to be able to have proper notifications? Reminder - the events won't be sent by the app. they are stored in MySQL and should be stored on some other service as well (that i dont know of yet). I don't know also if the webview can handle the website programmed login-logout with $_SESSION php parameters.
I would really appreciate some guidance.
Thanks in advance,

React Native Dynamically load modules/plugins?

As far as I've searched it appears to be impossible to load modules (=plugins/libraries?) dynamically (I'm very new to React Native..).
What I'd like to accomplish is to let the user of the app load additional functions as she/he desires.
Example:
A user wants to add a music plugin to the app.
Intuitively, I'd long for something like dynamic library loading. The user would fetch the library, it'll be loaded into the code and can then be executed. However, in React Native it seems like there are only modules that can be loaded?
Alternatively, I'd hope that auto-updating the app would allow to add modules "on-the-fly" ( https://github.com/aerofs/react-native-auto-updater or www.npmjs.com/package/react-native-hot-load ). But I fear that this is only for JS and data content?
The ability to dynamically add functionality to the app is an essential part of the app. I have no previous experience worth mentioning in mobile app development.
Question: Is it possible to dynamically add functionality (also native in nature) to React Native apps?
If not, would there be a workaround?
EDIT: I have found the following repository on github: https://github.com/yusefnapora/react-dynamic-linking-example .
Unfortunately, without any description. I have no idea about Objective-C, but the repo name sounds promising. Anybody knows what its purpose is?