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: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon
Accepted Solution

Working with Wifi available/unavailable

Hi,

 

I am sending my code to sleep for a long time if there is no wifi connection as my app is dependent on being connected to a network via wifi.

 

I am succesfully listening for networkConnected and now want to wake my code up from t.sleep(10000);

 

I have tried calling the thread with notifyAll(), notify(), interrupt() bu it doesnt get woken up.

 

Is it possible to wake a thread up before it is meant to wake up?

Developer
Posts: 16,984
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Working with Wifi available/unavailable

use wait on a sync instead of sleep
----------------------------------------------------------
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
Highlighted
Developer
Posts: 178
Registered: ‎04-16-2011
My Device: torch 9800
My Carrier: verizon

Re: Working with Wifi available/unavailable

Thanks simon,

 

did the trick.