I want to show a status bar notification which contains two texts and one progress bar of a track playing in the background to show the playback progress. This should be updated every second.
I am currently using a RemoteViews which contains a ProgressBar, and two TextViews, and I am updating them using RemoteViews.setTextViewText() and RemoteViews.setProgressBar(), then calling NotificationManager.notify() to show the updates on the notification bar. This works fine, but it gets very slow by time, I saw in the LogCat that it is producing huge amount of garbage and it seems that it is taking too long to collect it.
Any ideas on how to implement this in a better way?
Thanks