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
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

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.
Contributor
Posts: 10
Registered: ‎06-18-2010
My Device: 9550
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.

Developer
Posts: 1,305
Registered: ‎01-21-2009
My Device: Not Specified

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.
Regular Contributor
Posts: 83
Registered: ‎04-29-2011
My Device: 9300 Curve
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
Highlighted
Trusted Contributor
Posts: 202
Registered: ‎11-21-2010
My Device: 9700
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.