08-14-2012 10:44 AM
Hi Erik Oros,
Thank you very much for the links. The solution is working perfect.
But we have one problem.
If user changes the device locale from device options and if he/she didn't restart the phone, the application title is not changed.
Is there anyway we can overcome this problem?
Thanks,
Chaivck.
08-14-2012 11:59 AM
That might be a little more difficult; I'm not aware of any such listener that could be implemented.
One step closer would be implementing the onForeground event to update the title when the application is activated:
https://developer.blackberry.com/html5/apis/blackb
That still doesn't give you an immediate update, but it does prevent the need for a restart (i.e. it updates each time the app is launched.)
Unless you're setting some internal timer to check the locale every ~5s or so and never actually quitting your application, then I don't think you'll be able to get an immediate change. The timer could potentially run only when the app is in the background to minimize performance impact in your app. I'm not sure of the overall impact this would have on the OS performance though if the call is being made regularly.
Perhaps someone in the community has a better idea though...
08-14-2012 12:02 PM - edited 08-14-2012 12:03 PM
Actually, just found these:
http://supportforums.blackberry.com/t5/Java-Develo
On the Java side, there are some global events that would be triggered on a change. There is already a community extension for global events:
https://github.com/blackberry/WebWorks-Community-A
So it seems the implementation should be fairly "simple".
08-15-2012 05:05 PM
Hi Erik Oros,
Thank you for the help. The solution is working great.
Thanks,
Chaivck.