यह संभव है लेकिन जिस तरह से आप इसे लागू करते हैं, उस एपीआई स्तर पर निर्भर करता है जिसके लिए आप विकसित होते हैं।
11 से नीचे एपीआई स्तरों के लिए, आप Notification.FLAG_NO_CLEAR सेट कर सकते हैं। 11 से ऊपर
// Create notification
Notification note = new Notification(R.drawable.your_icon, "Example notification", System.currentTimeMillis());
// Set notification message
note.setLatestEventInfo(context, "Some text", "Some more text", clickIntent);
// THIS LINE IS THE IMPORTANT ONE
// This notification will not be cleared by swiping or by pressing "Clear all"
note.flags |= Notification.FLAG_NO_CLEAR;
API स्तरों के लिए, या जब Android Support Library का उपयोग कर, एक इसे इस तरह लागू कर सकते हैं:: यह इस तरह लागू किया जा सकता
Notification noti = new Notification.Builder(mContext)
.setContentTitle("Notification title")
.setContentText("Notification content")
.setSmallIcon(R.drawable.yourIcon)
.setLargeIcon(R.drawable.yourBigIcon)
.setOngoing(true) // Again, THIS is the important line
.build();
antew पद के साथ combitation में, मैं वास्तव में Notification.FLAG_ONGOING_EVENT लिए देख रहा था। बहुत बहुत धन्यवाद – Kelib