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
Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009

Re: Database connection - File system not ready

I'm missing something. Where is doStartupWork() being called?




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Please use plain text.
Contributor
wbasheer
Posts: 10
Registered: ‎06-18-2010
My Carrier: Sprint

Re: Database connection - File system not ready

doStartupWork()??? Is that a method of the SystemListener?  I thought doSystemWork was just an example function for that example.  In my code, the doSystemWork() is the starting of the listening thread where then I initialize my database and access the file system.

 

Let me know if I have to implement the doStartupWork function or I have to call/start the listening thread in a different part of my code.

 

Thanks.

Please use plain text.
Developer
Ted_Hopp
Posts: 1,305
Registered: ‎01-21-2009

Re: Database connection - File system not ready

Sorry. doStartupWork was in OP's posted code. I didn't realize that you aren't using the same code structure.

 

I don't know what's going on. Perhaps it's a bug in the system initialization for the 9700 simulator, where powerUp is being called a little too soon.




Solved? click "Accept as solution". Helpful? give kudos by clicking on the star.
Please use plain text.
Regular Contributor
Saeger
Posts: 83
Registered: ‎04-29-2011
My Carrier: TIM

Re: Database connection - File system not ready

Hello guys, i know this thread is old, but i had the same problem as described.
I solved the problem using just Thread.sleep;

Something like:

int i = 0;
while (i < 100) {
try {
database = DatabaseFactory.openOrCreate(uri, new DatabaseSecurityOptions(false));
break;
} catch(Exception e) {
Thread.sleep(300);
}
i++;
}
Márcio Saeger - Software Engineer, Softwell Solutions
Please use plain text.
Trusted Contributor
KJake
Posts: 202
Registered: ‎11-21-2010
My Carrier: Virgin Mobile

Re: Database connection - File system not ready

Hi Seager.  Just reading through your posts and wondering if you might be able to help out with an issue I'm experiencing.  Please take a look at http://supportforums.blackberry.com/t5/Java-Development/Detect-SDCARD-on-App-Startup/td-p/1923599.  Having a very difficult time detecting sdcard after device restarts.

Please use plain text.