Ejemplo n.º 1
0
Interstital.setAdUnitId('ca-app-pub-3940256099942544/1033173712');

var Example = React.createClass({
  getInitialState: function() {
    return {
      size: 'banner',
    };
  },
  press(size) {
    this.setState({
      size: size,
    });
  },
  showInterstital() {
    Interstital.tryShowNewInterstitial(null);
  },
  render: function() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to react-native-admob!
        </Text>
        <Text onPress={this.showInterstital} style={styles.instructions}>
          Show Interstital
        </Text>
        <Text onPress={this.press.bind(this, 'banner')} style={styles.instructions}>
          Set banner size to 'banner'
        </Text>
        <Text onPress={this.press.bind(this, 'largeBanner')} style={styles.instructions}>
          Set banner size to 'largeBanner'