Android notification pls help

@MonteliaRO

What about your version information?

Settings vary depending on the situation.

Reference site:

void showNotification() {
// Create an explicit intent for an Activity in your app
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getContext())

.setSmallIcon(R.drawable.icon)
.setContentTitle("This is a messsage")
.setContentText("Mouse pressed event detected!")
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setAutoCancel(true);
// Show the notification
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getContext());
// notificationId is a unique int for each notification that you must define
int notificationId = 666;
notificationManager.notify(notificationId, mBuilder.build());
}