Background
This is an application that I am writing to familiarize myself with some of the APIs, it serves no real purpose other than to demonstrate some features in Android. I have a Service that runs in the foreground ( startForeground ), and has a current Notification , which when clicked returns to the application. Service listens for broadcasts and writes them to the database.
Start the service, create a notification
I create my Notification using NotificationCompat.Builder in the onCreate Service :
@Override public void onCreate() { super.onCreate(); Log.v(TAG, "onCreate");
When Service starts, the Notification text and ticker are displayed in all versions of Android:

Next, Update Notification
I also added an interface callback to my Service , which would Notification by changing the text and text of the ticker text:
@Override public void updateNotificationTicker(String newTickerText) { Log.d(TAG, "updateNotificationTicker"); if (mNotificationBuilder != null && mNotificationManager != null) { mNotificationBuilder.setTicker(newTickerText); mNotificationBuilder.setContentText(newTickerText); mNotificationManager.notify(NOTIFICATION_ID_FOREGROUND, mNotificationBuilder.build()); } }
In order to test the Notification update, I had a BroadcastReceiver listen to the timeout broadcasts and call updateNotificationTicker with the current time:
else if (action.equals(android.content.Intent.ACTION_TIME_TICK)) { SimpleDateFormat sdf = new SimpleDateFormat("h:mm aa", Locale.US); String message = "The time is now " + sdf.format(new Date()); newLogEntry.setMessage(message);
This works fine (almost) in every version of Android, when the ticker text blinks and the content text is updated to Notification :
- Android 2.2 (API 8)
- Android 4.0.3 (API 15)
- Android 4.1.2 (API 16)
- Android 4.2.2 (API 17)


Miscellaneous behavior on Android 2.3.3
When running on an emulator or Android 2.3.3 device (API 10), the text of the ticker is first displayed at the first start of the Service (see the 1st screenshot: "Starting the monitoring service"). However, the text of the ticker is never displayed when updating Notification , even if the text of the content is being updated.

Questions
- Am I setting up my
NotificationCompat.Builder so that the ticker text does not display on Android 2.3.3? - Or does Android 2.3.3 behave differently than other versions when the text of the ticker is displayed when updating the current
Notification ? - Or is this a defect with
NotificationCompat.Builder not working properly on Android 2.3.3?