Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 23
Registered: ‎08-06-2008
My Device: Not Specified
Accepted Solution

How to find out when current BB system booted up?

Well I am puzzled: key events do have time since the device was turned on (that is not system uptime, is it?), but how to get even that info without user hitting any key?



The actual task at hands: find a certain way to indicate that your application has run since boot time.


The idea was to use persistence to store the time of app start and compare it against system uptime on subsequent runs - if app time is greater - it has run, otherwise it has not.






BlackBerry Development Advisor
Posts: 15,874
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to find out when current BB system booted up?

I recommend storing your value in RuntimeStore, instead of PersistentStore.  The RuntimeStore is cleared out when the BlackBerry is reset, so you can ensure that the value you are looking at was the one your application added on the last start up.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.