aboutsummaryrefslogtreecommitdiffstats
path: root/src/standardPush/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/standardPush/java')
-rw-r--r--src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java b/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
index 3e9a00a3c..d812105aa 100644
--- a/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
+++ b/src/standardPush/java/de/pixart/messenger/services/InstanceIdService.java
@@ -1,15 +1,24 @@
package de.pixart.messenger.services;
import android.content.Intent;
+import android.support.v4.content.ContextCompat;
+import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceIdService;
+import de.pixart.messenger.Config;
+import de.pixart.messenger.utils.Compatibility;
+
public class InstanceIdService extends FirebaseInstanceIdService {
@Override
public void onTokenRefresh() {
Intent intent = new Intent(this, XmppConnectionService.class);
intent.setAction(XmppConnectionService.ACTION_FCM_TOKEN_REFRESH);
- startService(intent);
+ try {
+ startService(intent);
+ } catch (Exception e) {
+ Log.e(Config.LOGTAG, "unable to refresh FCM token", e);
+ }
}
}