 <p>Check if <code>remoteMessage.getNotification()</code> is not NULL. I think it is NULL because you are not sending the param 'notification' in your <code>$fields</code> array of your PHP code. You are sending 'data'. So, when you send the parameter 'data' you have to get that parameter with <code>remoteMessage.getData()</code>. </p> <p>Try to print the content of <code>remoteMessage.getData().toString()</code> in your onMessageReceived method. It should print the data you are sending in the notification.</p> <p>Hope this helps.</p>