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
New Developer
Posts: 10
Registered: ‎12-16-2009
My Device: Not Specified

Start application on Wifi network connected : WLANConnectionListener

[ Edited ]

Hi,

 

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.

BlackBerry Development Advisor
Posts: 15,300
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Start application on Wifi network connected : WLANConnectionListener

Listeners are called from processes outside of your application, they do not start your application.  You should not perform blocking operations within their methods.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Regular Contributor
Posts: 77
Registered: ‎09-19-2008
My Device: Blackberry 8320
My Carrier: Airtel India

Re: Start application on Wifi network connected : WLANConnectionListener

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)