02-01-2013 02:35 AM
I have a scenario in my application, where on app start I have to check whether the local database data is up-to-date or not. In case the data is not up-to-date, I have to show a dialog asking the user to update the database. The user has the option to select "update now" or "update later".
This dialog has to pop up after a fixed interval(suppose after every 2 hours) automatically if the user doesn't update his database.
I am getting runtime exception when I try to show the dialog in the same thread. By reading various forum, I found out that this can be achieved by opening the dialog in a separate thread. In that case I won't be able to communicate between user input value and application(as they are two separate thread).
Can anyone help me out here? Is this functionality achievable ? If yes, the how? If no, what can be the alternate option?
I am targeting Blackberry OS 5.0 and above.
02-01-2013 03:30 AM
02-01-2013 05:32 AM
Just to expand a little on what Simon has said.
The whole BlackBerry system is just a series of Threads all doing different things and they all communicate. The important thing is that the Threads share Objects. And if you need to co-orindate activity, then look at wait/notify.
Please avoid Global Events, I have worked on a system that used Global Events to communicate between various parts of the application and that was a singificant overhead just to provide intra application message switching.