Welcome!

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

Reply
Regular Contributor
guydor
Posts: 65
Registered: ‎05-15-2011
My Device: 9700
Accepted Solution

Happend only once...

Hi,

 

How can I make something to happend only once, like a dialog that will be shown only at the first application launch.

 

 

Thanks

Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: Happend only once...

Probably not the neatest solution but you could keep a flag in the persistent store and check if its a first time launch show the dialog.

I think there might be a better solution for this.
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Happend only once...

save a status, for example in the persistent store
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
guydor
Posts: 65
Registered: ‎05-15-2011
My Device: 9700

Re: Happend only once...

Is there anything that saves for example objects and then I can retrieve it using a key?

Developer
dx22
Posts: 402
Registered: ‎11-26-2010
My Device: Torch

Re: Happend only once...

Yes the PersistentStore ... make a search and you'll find many tutorials.
----------------------------------------------------------------------
Press the button to give kudos if I helped you :smileyhappy:
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Happend only once...

you can save a Boolean in the persistent store, yes.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
guydor
Posts: 65
Registered: ‎05-15-2011
My Device: 9700

Re: Happend only once...

Another question if may I please,

 

If I have a database file and I want the user to get access to it, what are my options to store that file? (I want to store it locally on the device)

Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780

Re: Happend only once...

You can use persistent store or SQLite Database...

For another option, you can save data to file text using FileConnection..

 

correct me if i'm wrong

Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780

Re: Happend only once...

You can use persistent store or SQLite Database...

For another option, you can save data to file text using FileConnection..

 

correct me if i'm wrong..