Android Ressources problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Android Ressources problem

Lucius9
Hello

I have implemented 2 activities on Android. One which search for a device and send the uid in the intent to start the second activity which will invoke actions on this device.
 I have a problem with the UpnpService. I would like to shutdown the device discovery once I have the device I want because it makes my CPU works for nothing...


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Android Ressources problem

Christian Bauer
Administrator
There is no single switch in Cling that disables discovery dynamically. I guess you could write a custom ProtocolFactory that ignores incoming discovery messages dynamically. Pull requests welcome.

Reply | Threaded
Open this post in threaded view
|

Re: Android Ressources problem

Lucius9
Ok thank you. Maybe it is too much complicated for me ^^

If I want to retrieve the device in my second activity I must use the serviceConnection that instanciates the UpnpService right  ? but if I do thats it restart the device discovery ?