Skip to content

Commit

Permalink
Updating Instabug SDK to 8.1.1 and migrating to the new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
mzelzoghbi committed Mar 3, 2019
1 parent 9f510b3 commit a198d67
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
// TODO add the following 2 lines if you exclude io.reactivex from Instabug
// implementation 'io.reactivex:rxjava:1.0.13'
// implementation 'io.reactivex:rxandroid:1.0.1'
implementation('com.instabug.library:instabug:8.0.11') {
implementation('com.instabug.library:instabug:8.1.1') {
// TODO uncomment this line to exclude RxJava from Instabug and use your own version
// exclude group: 'io.reactivex'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void onCreate() {

//initialing instabug
new Instabug.Builder(this, "48ad905e141bc665d064945f423aa414")
.setInvocationEvents(InstabugInvocationEvent.SHAKE, InstabugInvocationEvent.SCREENSHOT_GESTURE,
.setInvocationEvents(InstabugInvocationEvent.SHAKE, InstabugInvocationEvent.SCREENSHOT,
InstabugInvocationEvent.FLOATING_BUTTON, InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT)
.build();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package com.example.instabug.fcm;

import com.example.instabug.R;
import com.example.instabug.ui.activities.MainActivity;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.instabug.library.Instabug;

import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
Expand All @@ -15,6 +9,12 @@
import android.support.v4.app.NotificationCompat;
import android.util.Log;

import com.example.instabug.R;
import com.example.instabug.ui.activities.MainActivity;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
import com.instabug.chat.Replies;

/**
* Created by vezikon on 6/27/16.
*/
Expand All @@ -30,9 +30,9 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
Log.d(TAG, "Message: " + message);

//Check first if notification related to Instabug or not
if (Instabug.isInstabugNotification(remoteMessage.getData())) {
if (Replies.isInstabugNotification(remoteMessage.getData())) {
//Shown notification related to Instabug
Instabug.showNotification(remoteMessage.getData());
Replies.showNotification(remoteMessage.getData());
} else {
sendNotification(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import android.preference.PreferenceManager;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;

import com.google.firebase.iid.FirebaseInstanceId;
import com.instabug.library.Instabug;
import com.instabug.chat.Replies;


/**
Expand Down Expand Up @@ -66,7 +67,7 @@ protected void onHandleIntent(Intent intent) {
*/
private void sendRegistrationToServer(String token) {
// send your registration token to Instabug
Instabug.setPushNotificationRegistrationToken(token);
Replies.setPushNotificationRegistrationToken(token);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected String doInBackground(Void... params) {

//logging network request to instabug
InstabugNetworkLog networkLog = new InstabugNetworkLog();
networkLog.Log(urlConnection, jsonParam.toString(), moviesJsonStr);
networkLog.log(urlConnection, jsonParam.toString(), moviesJsonStr);

return moviesJsonStr;
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ task clean(type: Delete) {


ext {
androidSupport = "27.1.1"
androidSupport = "28.0.0"
}

0 comments on commit a198d67

Please sign in to comment.