urbanairship / react-native-airship

Airship React Native module
Other
88 stars 62 forks source link

Channel Id is Undefined: #59

Closed lavarajallu closed 6 years ago

lavarajallu commented 7 years ago
  var channelId = UrbanAirship.getChannelId().then(channelId => {
               alert('Channel: '+ channelId)
              })
              UrbanAirship.addListener("register", (event) => {
                alert('Channel registration updated: ', event.channelId);
                alert('Registration token: ', event.registrationToken);
               })
              UrbanAirship.setNamedUser(myUserIdl)

              UrbanAirship.getNamedUser().then((namedUser) => {
               alert('Named User: ', namedUser)
               })

I am giving these four steps when i login method successful response. how can I get the Channel Id and How can I pass the User id in UrbanAirship.setNamedUser(myUserIdl) . //is it right way for passing the User Id?

rlepinski commented 7 years ago

Could you tell me the output of the above? Whats not working here?