In All condition i am getting notification fine but in below android 6.0 not getting notification only if when app killed
here is my receiver's method
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
if (remoteMessage.getData().size() > 0) {
Log.e(TAG, "Data Payload: " + remoteMessage.getData().toString());
try {
params = remoteMessage.getData();
Log.e(TAG, "FCM data: " + new JSONObject(params).toString());
JSONObject json =new JSONObject(params);
handleDataMessage(json);
} catch (Exception e) {
Log.e(TAG, "Exception: " + e.getMessage());
}
}
//here is manifest.xml
<service android:name="com.cdn.techquiq.consumer.fcm.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT">
</intent-filter>
</service>
<service android:name="com.cdn.techquiq.consumer.fcm.MyFirebaseInstanceIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>