I am using the following code to add an icon to Notification status, it works well, it always display even if I exit the app.
But the icon disappears whenever I restart mobile phone, what can I do to make the icon always display even if I restart phone ?
private void showNotification() {
NotificationManager notificationManager = (NotificationManager)
this.getSystemService(android.content.Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.smsforward,"My System", System.currentTimeMillis());
notification.flags |= Notification.FLAG_ONGOING_EVENT;
notification.flags |= Notification.FLAG_NO_CLEAR;
CharSequence contentTitle = "My System Title";
CharSequence contentText = "My System Title content";
Intent notificationIntent = new Intent(this, SMSMain.class);
PendingIntent contentItent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);
notification.setLatestEventInfo(this, contentTitle, contentText,contentItent);
notificationManager.notify(0, notification);
}