Commit 53df632d authored by Libin Lu's avatar Libin Lu

import fix

parent bac85ddb
......@@ -3,8 +3,13 @@ package com.evollu.react.fcm;
import java.util.Map;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
......@@ -23,6 +28,8 @@ public class MessagingService extends FirebaseMessagingService {
handleBadge(remoteMessage);
buildLocalNotification(remoteMessage);
final Intent message = i;
// We need to run this on the main thread, as the React code assumes that is true.
// Namely, DevServerHelper constructs a Handler() without a Looper, which triggers:
// "Can't create handler inside thread that has not called Looper.prepare()"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment