[admob][android] WIP Basic view
This commit is contained in:
parent
8df8f5a68c
commit
18774bbb40
|
@ -59,4 +59,5 @@ dependencies {
|
|||
compile "com.google.firebase:firebase-crash:$firebaseVersion"
|
||||
compile "com.google.firebase:firebase-config:$firebaseVersion"
|
||||
compile "com.google.firebase:firebase-perf:$firebaseVersion"
|
||||
compile "com.google.firebase:firebase-ads:$firebaseVersion"
|
||||
}
|
||||
|
|
|
@ -9,10 +9,12 @@ import com.facebook.react.bridge.ReactApplicationContext;
|
|||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.uimanager.ViewManager;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import io.invertase.firebase.admob.RNFirebaseAdMob;
|
||||
import io.invertase.firebase.auth.RNFirebaseAuth;
|
||||
import io.invertase.firebase.config.RNFirebaseRemoteConfig;
|
||||
import io.invertase.firebase.storage.RNFirebaseStorage;
|
||||
|
@ -66,6 +68,8 @@ public class RNFirebasePackage implements ReactPackage {
|
|||
*/
|
||||
@Override
|
||||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
|
||||
return Collections.emptyList();
|
||||
return Arrays.<ViewManager>asList(
|
||||
new RNFirebaseAdMob()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
2
index.js
2
index.js
|
@ -1,3 +1,5 @@
|
|||
import Firebase from './lib/firebase';
|
||||
|
||||
export const AdMob = require('./lib/modules/admob');
|
||||
|
||||
export default Firebase;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { PropTypes } from 'react';
|
||||
import { requireNativeComponent, View } from 'react-native';
|
||||
|
||||
const Banner = {
|
||||
name: 'Banner',
|
||||
propTypes: {
|
||||
src: PropTypes.string,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = requireNativeComponent('RNFirebaseAdMobBanner', Banner);
|
|
@ -0,0 +1 @@
|
|||
export const Banner = require('./Banner');
|
|
@ -1,6 +1,8 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
|
||||
import { Banner } from './../firebase/modules/admob';
|
||||
|
||||
import CoreContainer from './containers/CoreContainer';
|
||||
import setupStore from './store/setup';
|
||||
import { setupSuites } from './tests/index';
|
||||
|
@ -50,11 +52,12 @@ function bootstrap() {
|
|||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Provider store={this.state.store}>
|
||||
<CoreContainer />
|
||||
</Provider>
|
||||
);
|
||||
return <Banner style={{ width: 100, height: 100, backgroundColor: 'pink'}} />;
|
||||
// return (
|
||||
// <Provider store={this.state.store}>
|
||||
// <CoreContainer />
|
||||
// </Provider>
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue