12-22-2010 03:58 AM - edited 12-22-2010 07:32 AM
I should write a UDP listener application,which starts a blackberry application on receiving the UDP packet.
I have seen the API to listen for Wifi network connected events.I understand that I have to write a WLANListener for that.Is it a thread running in the background waiting for the event or on registering my app, will the platform starts my application.
My intention is IF is not a thread,then UDP listener need not be run always.I would start this app when device is Wifi connected.
Hope I have explained clearly..My doubt is..IF the Wifi listener is again a thread..it is better not to develop one...so that UDP listener thread will alone would do the purpose.
Any help is really appreciated.
Thanks in Advance.
12-24-2010 11:23 AM
Listeners are called from processes outside of your application, they do not start your application. You should not perform blocking operations within their methods.
12-26-2010 03:35 AM
If I understood your concern, then you want to do UDP connection when Wi-Fi is up on device.
Why cant you have your application running in background and register for globallistener. When you receive event callback check whether it is WiFi connected. If yes then do your need (UDP etc)