b8ne / react-native-pusher-push-notifications

Manage pusher interest subscriptions and notification events in Javascript.
MIT License
98 stars 86 forks source link

Can't subscribe #16

Closed LeoIannacone closed 6 years ago

LeoIannacone commented 6 years ago

With version 1.0.6

I can't subscribe/do anything.

This code does not print anything in Android (a part the first line):

RNPusherPushNotifications.setAppKey('MY_KEY');

function initInterests(interest) {
  // Subscribe to push notifications
  if (Platform.OS === 'ios') {
    // iOS callbacks are beta, so dont use them
    RNPusherPushNotifications.subscribe(interest);
  } else {
    // Android is better, so handle faults
    RNPusherPushNotifications.subscribe(
      interest,
      (error) => {
        console.error('subscribe error', error);
      },
      (success) => {
        console.log('subscribe success', success);
      }
    );
  }
AnandKuhar commented 6 years ago

what did u do for this. Same thing happens with me

LeoIannacone commented 6 years ago

I found another way to achieve what I needed to do (in my case handle the push notifications in my way).

I had to patch the library, couldn't find a better solution

AnandKuhar commented 6 years ago

How to patch the library??

b8ne commented 6 years ago

hey @LeoIannacone @AnandKuhar I just merged #11 and am looking at merging #19 from the dev branch. It should unify all JS implementation and allow full callback and notification event support. I will review it and merge this weekend, however if you guys want to test out the dev branch and provide any feedback that would be great.