So I got push-notifications working with Google's Firebase Cloud Messaging. The only problem now is that the notification doesn't show any alert, only if I pull down the notification drawer that I see it's there.
I've got this part of the code where I think that "popup" feature is added
public void displayNotification(String title, String body){
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mContext, Constants.CHANNEL_ID)
.setSmallIcon(R.mipmap.ic_launcher)
.setContentTitle(title)
.setContentText(body);
Intent intent = new Intent(mContext, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(mContext,0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pendingIntent);
NotificationManager mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
if(mNotificationManager != null) {
mNotificationManager.notify(1, mBuilder.build());
}
}
Other problem I have is that when I click the notification, it opens the activity but doesn't delete the notification.