Commit d5d5284f authored by Libin Lu's avatar Libin Lu Committed by GitHub

filter out notification event from clicking icon

parent da8c10e6
...@@ -297,6 +297,10 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li ...@@ -297,6 +297,10 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li
@Override @Override
public void onNewIntent(Intent intent){ public void onNewIntent(Intent intent){
// don't call notification if it is started from icon
if(intent.getAction() == "android.intent.action.MAIN"){
return;
}
sendEvent("FCMNotificationReceived", parseIntent(intent)); sendEvent("FCMNotificationReceived", parseIntent(intent));
} }
} }
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