tags:

views:

26

answers:

1

Please let me know how to resolve this problem.

Statusbar notification messages are shown in X language even after locale language is changed from X to Y.Please help me what needs to be done to refresh it. Eg: Even after changing locale lang from En to Ja , statusbar notification messages are shown in En only i.e The application which is sending statusbar notification is run firsttime in En language .

Thanks Venugopal

A: 

In theory, this should work:

Step #1: Register a BroadcastReceiver in your manifest, watching for ACTION_LOCALE_CHANGED.

Step #2: When your BroadcastReceiver is called with onReceive(), cancel() and re-raise your Notification, if your Notification is on-screen.

The catch is that you will need to know whether your Notification is on-screen or not. That is not very straight-forward. You can try the technique outlined in this StackOverflow answer, though I have not tried that technique personally. I have filed an issue requesting an isActive() method for NotificationManager, or the equivalent, to help fill this gap.

CommonsWare