How to use the urbanairship-react-native.UrbanAirship.setForegroundPresentationOptions function in urbanairship-react-native

To help you get started, we’ve selected a few urbanairship-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github blockmason / lndr-mobile / packages / lndr / engine / index.ts View on Github external
initalizePushNotifications() {
    UrbanAirship.setUserNotificationsEnabled(true)
    UrbanAirship.addListener("register", (event) => {
      console.log('Channel registration updated: ', event.channelId);
      console.log('Registration token: ', event.registrationToken);
    });
    UrbanAirship.addListener("pushReceived", (notification) => {
        console.log('Received push: ', JSON.stringify(notification));
    });
    UrbanAirship.setForegroundPresentationOptions({
      alert: true,
      sound: true,
      badge: true
    });
  }
github blockmason / lndr-mobile / packages / ui / views / account / home / index.tsx View on Github external
const { type, user } = actions

        if(type === 'NewPendingCredit') {
          const { route, pendingTransaction, pendingSettlement } = this.props.getPendingFromFriend(user)
          if(pendingTransaction !== undefined || pendingSettlement !== undefined) {
            navigation.navigate(route, { pendingTransaction, pendingSettlement })
          }
        } else if(type === 'RequestPayPal') {
          const friend = this.props.getFriendFromNick(user)
          navigation.navigate('Settlement', { friend, settlementType: 'paypal' })
        } else {
          navigation.navigate('Activity')
        }
      } catch(e) {}
    })
    UrbanAirship.setForegroundPresentationOptions({
      alert: true,
      sound: true,
      badge: true
    })
  }