private void Sendnotify () {
notificationmanager manager = (Notificationmanager) getsystemservice ( Notification_service);
notificationcompat.builder Builder = new Notificationcompat.builder (mainactivity.this, "Default");
intent Intent = new Intent (Intent.action_view, Uri.parse ("https://www.baidu.com")); //here to open the app as needed instead of
pendingintent pi = pendingintent.getactivity (mainactivity.this, 0, Intent, 0);
notification notify = Builder.setsmallicon (r.mipmap.ic_launcher_round)
.setpriority ( Notification.priority_default)//Notification of Priority
.setcategory (Notification.category_message)//type of notification
. Setcontenttitle ("Order Notify")
.setautocancel (True)
.setcontentintent (pi)
. Setcontenttext ("A New Order Message")
.setfullscreenintent (pi, true)//Do not set this item will not hang, false will not appear hanging
. Build ();
manager.notify (1,notify);
}
Android Desktop notification notify