Google AdMob for react native - react-native

After installing ad mob (installed from this) and link it to my react native project, my app crash.
What is the best way to add google ad mob with the latest react native version?
P.s. can you show me all of the steps to get a working admob application?

Do what that link said you to do.
Then just complete another small step
Goto
node-module/react-native-admob/android/build.gradle file replace the line
compile 'com.google.android.gms:play-services-ads:+'
with the following line
compile 'com.google.android.gms:play-services-ads:16.0.0'

Related

Expo + Stripe CardFormField crashes on Android build

I am implementing Stripe in my React Native (Expo) app. When testing it out with ExpoGO it works well, and so does the iOS build via Testflight. However, after building the app for Android it will crash whenever the CardFormField component (provided by Stripe) is rendered.
I have logged the errors in Sentry, and this is where it goes wrong:
Binary XML file line #5 in [censored]:layout/stripe_card_form_view: Error inflating class com.google.android.material.card.MaterialCardView
IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant).
I then found this, here:
In order to use CardForm component, you need to install and configure Material Components theme in your app.
I do however fail to find information on how I am expected to comply with this requirement using Expo. Do anyone have any ideas?
I am using:
expo 43.0.3
#stripe/stripe-react-native 0.2.2
App is built with eas
I use expo (not an ejected app)
Thanks in advance for any help.
With Expo you have a choice between managed vs. bare workflows. In order to access the build.gradle and styles.xml files to configure the Material Components theme you need to switch to a bare workflow. You need to use expo eject to create the native Android files in question.

react-native-external-display library is not supporting in expo

react-native-external-display library not supporting in expo app. facing error null is not an object (evaluating 'RNExternalDisplayEvent.SCREEN_INFO'). I would like to use a expo in the device which has two display screens so I need to display my code based on display screen.
. Please support me with your suggestions If any other library which will support my requirement. Thanks in advance.
I have not found any other library that supports an external display for React Native. Therefore using Expo may not be the best choice.
You could eject expo and then add the react-native-external-display library, which may require you to fix some errors. Alternatively you could start a new project without expo and add the library.

Synchronizing React-native application integrated with the iOS Calendar using expo

I am trying to link my react native app with the iOS calendar. My app runs on expo and uses the react-native-calendar-strip. I've been searching to see how to make a start but not quite sure.Could you please guide me on how to do this?
below is the package that I used
https://github.com/BugiDev/react-native-calendar-strip

Eject from Expo and come back again to it

I am working on a mobile application in Expo and after I reached to 30 percent of progress in my project, I realized that I can not use Mapbox libraries with Expo.
So My question is that, if I reject from Expo and write my Mapbox related codes in React Native, after that can I come back again to Expo to develop the rest of the project in that?
You can eject your project with Expo kit. So you can work on native code and expo modules too.
after that can I come back again to Expo to develop the rest of the project in that?
No, you can't go back again to the expo is not reversible

Integrate facebook sdk to track event in app

I have tried to integrate facebook analytics to my app which was generated by expo but got error
Undefined is not an object( evaluating AppEventsLogger.logEvent)
I have tried to use expo eject to use expokit and then add the following code
import {AppEventsLogger} from 'react-native-fbsdk';
AppEventsLogger.logEvent('battledAnOrc');
Is there anyone add facebook analytics to app which generated by expo before?
That's expected behaviour since react-native-fbsdk includes native code (Any library that includes a react-native link step in its installation instructions)
Currently, there are no built-in modules in Expo that have made that module available. It can be seen that we are working hard at the moment.
If you want to use a module, you need to make the app a stand-alone app.
You can run this expo eject and yarn add react-native-fbsdk and react-native link react-native-fbsdk