chabokpush / chabok-client-rn

Chabok react native wrapper
https://doc.chabokpush.com/react-native-bridge/introducing.html
5 stars 5 forks source link

Dev to master v1.3.0 #39

Closed Husseinhj closed 5 years ago

Husseinhj commented 5 years ago

v1.3.0 (11/05/2019)

Changes:

Upgrade:

    implementation 'com.android.installreferrer:installreferrer:1.0'

    @Override
    public void onCreate() {
        super.onCreate();
        SoLoader.init(this, /* native exopackage */ false);

        if (chabok == null) {
            chabok = AdpPushClient.init(
                    getApplicationContext(),
                    MainActivity.class,
                    "APP_ID/SENDER_ID",
                    "API_KEY",
                    "USERNAME",
                    "PASSWORD"
            );

+            chabok.addNotificationHandler(new NotificationHandler(){
+                @Override
+                public boolean notificationOpened(ChabokNotification message, ChabokNotificationAction notificationAction) {
+                    ChabokReactPackage.notificationOpened(message, notificationAction);
+                   return super.notificationOpened(message, notificationAction);
+                }
+            });
        }
    }

@implementation AppDelegate