How to add react-native-firebase admob to react native ("0.60.x"). App crash when adding admob. Are there any other option to add admob to react-native app. react-native-admob also the same crashing problem.
Within the root of your React Native project, create a firebase.json file (if it doesn't already exist) and add the admob_android_app_id & admob_ios_app_id keys with the IDs from the Google AdMob console:
Like:
{
"react-native": {
"admob_android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx",
"admob_ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
}
Related
I am new to react native and met an issue want to seek for some help. Thanks everyone!
I am working on react native app storybook. I am using react-native-storybook-loader. I need the storybook to load stories from a node_module folder. To do so, I have below react native storybook loader config in my package.json
"config": {
"react-native-storybook-loader": {
"searchDir": [
"./node_modules/mystories/dist"
],
"pattern": "**/*.native.stories.{ts,tsx,js,jsx}",
"outputFile": "./src/storybook/storyLoader.js"
}
}
If I run start react native app in web mode, the stories are able to load. But with the same code, if I run start react native app in ios simulator, I see the "Unable resolve module ../../node_modules/mystories/dist/..." error.
I am not sure why the web and ios simulator have different behaviors? does ios simulator use a different way to load node_modules?
I've created a react native app and trying to add some ads following admob doc and when I add setContentView(R.layout.activity_main); in MainActivity.java in Android Studio it gives me this error: 'cannot resolve symbol activity_main'.
I don't have a layout folder in res (have re-created the app and still nothing).
Do I need to create layout and add activity_main.xml to it? And in that case, what do I add to the xml file?
No
You don't have to touch the native code of android of react native only for exceptional cases.
Follow an online tutorial to do the work.
How add How add addmob with react native on google
How to add "App Open Ads" in react native app android?
Thank you.
There is a library from GreedyGame for react native apps. This currently has app open ads integrated. The documentation is also updated.You can check out the docs here . You will need to sign up and get an appId to work. You can sign up here
I work at GreedyGame.
Is it possible to use expo video in bare react native project if install expo module according to new unimodules of expo?
If you want to put a video in your React Native App with expo, you can use Video expo
import { Video } from 'expo';
because react-native-video has conflict with expo, if you will use expo and you can't use resizeMode you need to update expo and create a new proyect, because, the expo librarys can be broken, if you will create a new proyec, you can move the screens of the old proyect to the new proyect
While creating an app in react native, I didn't get sub directories like android,or IOS. I Used create-react-native-app command.
New version of CRNA integrates Expo Toolkit, and android and ios folders are hidden. If you want to separate these folders, you must detach expo from react native app.
npm run reject
You can read more detail at CRNA's github