// init translated text\r
NavitTextTranslations.init();\r
\r
- // Setup a notification in the android notification bar, remove it in the exit() function\r
- NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r
- Notification notification = new Notification(R.drawable.icon,"Navit is running",0);\r
- notification.flags = Notification.FLAG_NO_CLEAR;\r
+ // NOTIFICATION\r
+ // Setup the status bar notification \r
+ // This notification is removed in the exit() function\r
+ NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); // Grab a handle to the NotificationManager\r
+ Notification NavitNotification = new Notification(R.drawable.icon,"Navit started",System.currentTimeMillis()); // Create a new notification, with the text string to show when the notification first appears\r
PendingIntent appIntent = PendingIntent.getActivity(getApplicationContext(), 0, getIntent(), 0);\r
- notification.setLatestEventInfo(getApplicationContext(), "Navit running", "Navit still running", appIntent);\r
- nm.notify(R.string.app_name, notification);\r
+ NavitNotification.setLatestEventInfo(getApplicationContext(), "Navit", "Navit running", appIntent); // Set the text in the notification\r
+ NavitNotification.flags|=Notification.FLAG_ONGOING_EVENT; // Ensure that the notification appears in Ongoing\r
+ nm.notify(R.string.app_name, NavitNotification); // Set the notification\r
\r
// get the local language -------------\r
Locale locale = java.util.Locale.getDefault();\r