react-native-google-places | Android Google Places Widgets | iOS library
kandi X-RAY | react-native-google-places Summary
kandi X-RAY | react-native-google-places Summary
iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Retrieves the current Place object for the given fields
- Find by field name
- Gets the place fields
- Fetches the currently active place information for the current user
- Gets the result map
- Reject a pending promise
- Generate the properties map for a place
- Returns the slug for the place type
- Gets the label for a place type
- Find by type id
- Gets the label
- Opens the Places modal
- Maps a type name to a TypeFilter
- Create module modules
- Generate accuracy predictions for a location
- Create native JavaScript module
- Lookup a Place by ID
- Create view managers
react-native-google-places Key Features
react-native-google-places Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-google-places
QUESTION
I got a react nativ app to optimize, my problem is that the render method of the main component ALWAYS takes like 5 secondes even when the component is empty (during which the app display a white empty screen). This is a big problem because a 5 sec white screen at the beginning of the app will make the users uninstall the app.
As you can see here in the logs there is always 5 sec between the rendering of the app and the rendering of the basic navigator with a basic component.
Here is my App.tsx code :
...ANSWER
Answered 2022-Mar-02 at 11:59From the documentation. PersistGate behaves in the following way:
PersistGate delays the rendering of your app's UI until your persisted state has been retrieved and saved to redux.
The delay you're enduring is most probably down to this. You can try and remove PersistGate
to verify this.
QUESTION
I have connected my app to google places API and I was working until a certain point (I'm not sure what changed) but the API is no longer receiving my request when I go check on the google developers console I neither shows 4XX or 2XX(previously showing)
this is my code
...ANSWER
Answered 2021-Oct-25 at 10:32I solved the problem, turns out my android studio emulator disconnected to it's wifi (dumb reason to get stuck on)
QUESTION
in my react native app I am using react-native-google-places-autocomplete
plugin for google search so in iOS by default gray icon come in the search bar for cancel check bar below image
https://github.com/FaridSafi/react-native-google-places-autocomplete
My code as below
...ANSWER
Answered 2021-Sep-23 at 23:37You can disable it in textInputProps
using clearButtonMode
.
QUESTION
Whenever I tries to do pod install
it gives me this error
Downloading dependencies
Installing BVLinearGradient (2.5.6)
Installing CocoaAsyncSocket (7.6.5)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.64.0)
Installing FBReactNativeSpec (0.64.0)
Installing Flipper (0.75.1)
Installing Flipper-Boost-iOSX (1.76.0.1.11)
Installing Flipper-DoubleConversion (1.1.7)
Installing Flipper-Fmt (7.1.7)
Installing Flipper-Folly (2.6.9)
Installing Flipper-Glog (0.3.6)
Installing Flipper-PeerTalk (0.0.4)
Installing Flipper-RSocket (1.4.3)
Installing FlipperKit (0.75.1)
Installing GoogleMaps (3.1.0)
Installing GooglePlaces (3.1.0)
Installing JGProgressHUD (2.2)
Installing MDFInternationalization (2.0.0)
Installing MaterialComponents (124.2.0)
Installing MotionAnimator (4.0.1)
Installing MotionInterchange (3.0.0)
Installing OpenSSL-Universal (1.1.1100)
Installing Pulsator (0.6.0)
Installing RCT-Folly (2020.01.13.00)
Installing RCTRequired (0.64.0)
Installing RCTTypeSafety (0.64.0)
Installing RNCAsyncStorage (1.15.2)
Installing RNCCheckbox (0.5.7)
Installing RNDeviceInfo (8.1.2)
Installing RNGestureHandler (1.10.3)
Installing RNImageCropPicker (0.36.0)
Installing RNReanimated (2.1.0)
Installing RNSVG (12.1.1)
Installing RNScreens (3.1.1)
Installing RNVectorIcons (8.1.0)
Installing React (0.64.0)
Installing React-Core (0.64.0)
Installing React-CoreModules (0.64.0)
Installing React-RCTActionSheet (0.64.0)
Installing React-RCTAnimation (0.64.0)
Installing React-RCTBlob (0.64.0)
Installing React-RCTImage (0.64.0)
Installing React-RCTLinking (0.64.0)
Installing React-RCTNetwork (0.64.0)
Installing React-RCTSettings (0.64.0)
Installing React-RCTText (0.64.0)
Installing React-RCTVibration (0.64.0)
Installing React-callinvoker (0.64.0)
Installing React-cxxreact (0.64.0)
Installing React-jsi (0.64.0)
Installing React-jsiexecutor (0.64.0)
Installing React-jsinspector (0.64.0)
Installing React-perflogger (0.64.0)
Installing React-runtimeexecutor (0.64.0)
Installing ReactCommon (0.64.0)
Installing ReactNativeART (1.2.0)
Installing ReactNativeLocalization (2.1.6)
Installing TOCropViewController (2.6.0)
Installing Yoga (1.14.0)
Installing YogaKit (1.18.1)
Installing ZIPFoundation (0.9.11)
Installing boost-for-react-native (1.63.0)
Installing glog (0.3.5)
Installing iDenfySDK (6.3.0)
Installing idenfy-react-native-sdk (1.6.0)
Installing libevent (2.1.12)
Installing lottie-ios (3.2.3)
Installing react-native-google-places (3.1.2)
Installing react-native-image-picker (3.3.2)
Installing react-native-image-resizer (1.4.4)
Installing react-native-maps (0.27.1)The Swift pod
iDenfySDK
depends uponMaterialComponents
andJGProgressHUD
, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!
globally in your Podfile, or specify:modular_headers => true
for particular dependencies.
If anyone know how to solve this issue
...ANSWER
Answered 2021-Aug-17 at 20:41Doesn't it tell you already how to solve the issue?
To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.
QUESTION
I am using expo v4.9.1 for this react native project. I am implementing the stack navigator as per this Document. It goes this way App.js
...ANSWER
Answered 2021-Jul-31 at 07:44So i dived a bit into the source code of react-navigation
and found an answer for you. According to https://github.com/react-navigation/react-navigation/blob/42a875212c5071b12e92eaf159ef488365413ab8/packages/core/src/useNavigationBuilder.tsx is designed to have its children to be only
Screen
elements:
QUESTION
Main errors: GMUHeatmapTileLayer.h not found
and
GMUKMLParser.h
not found.
This is how my Podfile looks like:
...ANSWER
Answered 2021-Apr-15 at 09:31To be able to build the project with react-native-maps
and use_frameworks
as described in the question I had to fork the react-native-maps
library and replace
Google-Maps-iOS-Utils
with Google_Maps_iOS_Utils
in header imports in
lib/ios/AirGoogleMaps/AIRGoogleMap.m
:
QUESTION
I'm writing tests for my react-native application, but it fails, suggesting I run pod install. After running pod install, I get
...ANSWER
Answered 2021-Mar-03 at 21:51Ok, I'm not an expert in React Native, but I do know how the Cocoapods are working and it looks like there's a conflict of versions because react-native-google-places
requires GoogleMaps
with version ~> 3.1.0 (which means 3.1.x) while react-native-google-maps
needs it to be exactly 3.5.0. You could check this in the modules podspec files:
- node_modules/react-native-google-places/react-native-google-places.podspec
- node_modules/react-native-maps/react-native-google-maps.podspec
I don't see a way to solve this from the pod file because it's either some issue with modules install or an outdated podspec file configuration.
In general such conflicts are resolved by upgrading or downgrading one of the pods dependencies. So in your case just to make it work you could go to react-native-google-places.podspec
and update the dependencies there to this:
QUESTION
I am trying to implement to search and pinpoint a location in react native. I am using react-native-maps
and react-native-google-places-autocomplete
packages for their obvious usages.
First I have initiated region in the state as:
ANSWER
Answered 2020-Dec-18 at 14:08
{
let tempMapRegion = this.state.mapRegion;
tempMapRegion.latitude = details.geometry.location.lat;
tempMapRegion.longitude = details.geometry.location.lng;
this.map.animateToRegion(this.newRegion(tempMapRegion));
this.setState({ address: data.description })
}}
query={{
key: AppSettings.googleMapApiKey,
language: 'en',
}}
/>
{ this.map = ref; }}
mapType={MAP_TYPES.TERRAIN}
initialRegion={this.state.mapRegion}
onRegionChangeComplete={(e) => { this.onRegionChange(e) }}
style={{ height: width, width: width, marginTop: -5 }}
>
{
let tempMapRegion = this.state.mapRegion;
tempMapRegion.latitude = e.nativeEvent.coordinate.latitude
tempMapRegion.longitude = e.nativeEvent.coordinate.longitude
this.map.animateToRegion(this.newRegion(tempMapRegion));
// this.setState({ mapRegion: tempMapRegion })
}}
/>
QUESTION
I am trying to use the GooglePlacesAutocomplete, but once I make the address query, for example: "São C" and the "listView" return something like: "São Caetano, São Paulo ...", but when I try to select one option it seems like the list is not visible, because and the selection do not affect the item list.
this is the code I am using:
...ANSWER
Answered 2020-Dec-02 at 17:23I recreated the Expo project and now it works, I could not found the root cause, but once that other project was made by other person and Expo make it easy to do and configure, it was fast enoght to create.
QUESTION
I'm realtively new to react-native. All my projects were running fine in the morning, but somehow they stopped working. When I run react-native start and the react-native run-android, the app gets installed on the device but then this error props up which was not happening before.
...ANSWER
Answered 2020-Jul-23 at 16:13Ciao, this problem is connected to graceful-fs
package. Plase, reinstall graceful-fs
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-google-places
Sign up for Google Places & Google Maps APIs for Android in Google API Console to grab your Android API key (not browser key).
Read further API setup guides at https://developers.google.com/places/android-sdk/signup.
Similarly, sign up for Google Places API for iOS in Google API Console to grab your iOS API key (not browser key).
Ensure you check out further guides at https://developers.google.com/places/ios-sdk/get-api-key.
Enable billing for your projects - please do not file any issues on this repo without first checking you have, indeed, enabled billing on your account.
With both keys in place, you can proceed.
If you do not have CocoaPods already installed on your machine, run gem install cocoapods to set it up the first time. (Hint: Go grab a cup of coffee!)
If you are not using Cocoapods in your project already, run cd ios && pod init at the root directory of your project. This would create a Podfile in your ios directory.
Run react-native link react-native-google-places at the root directory of your project and ensure you edit your Podfile to look like the sample below (remove all the targets you are not building for, such as Tests and tvOS):
Replace all references to YOUR_PROJECT_TARGET with your project target (it's the same as project name by default).
By now, you should be all set to install the packages from your Podfile. Run pod install from your ios directory.
Close Xcode, and then open (double-click) your project's .xcworkspace file to launch Xcode. From this time onwards, you must use the .xcworkspace file to open the project. Or just use the react-native run-ios command as usual to run your app in the simulator.
In your AppDelegate.m file, import the Google Places library by adding
Within the didFinishLaunchingWithOptions method, instantiate the library as follows - read about a better way to secure this below:
Ensure you have the required location permissions for the application by declaring keys for NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription in your info.plist file, either using Xcode or manually editing the file e.g.
This was done automatically for you when you ran react-native link react-native-google-places. Or you can run the command now if you have not already.
In your AndroidManifest.xml file, request the following permissions:
In your /android/gradle.properties file, add your API key, read about a better way to secure this below
The following additional setup steps are optional as they should have been taken care of, for you when you ran react-native link react-native-google-places. Otherwise, do the following or just ensure they are in place;
Add the following in your android/settings.gradle file:
Add the following in your android/app/build.grade file:
Add the Google Maven Repo in your android/build.gradle file:
Add the following in your ...MainApplication.java file:
Enable multiDex for your application.
Ensure you are compiling with Java 1.8 or above. Add the following in your /android/app/build.gradle file:
Finally, we can run react-native run-android to get started.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page