I am using the cling library for android to locate and control other mobile devices in my WiFi network. I have downloaded and imported (in Eclipse) the Cling Browser and Cling Switch Power Examples and they work fine until I exit the Switch power app from my remote device and start it again.
Afterwards, it is never again visible inside the Cling Browser App. The only way to make the device appear again inside the browser, is to force stop the Power Switch App from inside the apps menu of android settings and start it again.
Is there a possibility that the AndroidUpnpServiceImpl isn't shutting down correctly? I have tried to first unbind and then also stop the service using stopService() but still nothing.
I have tested on several devices, all using Android 4.1 and 4.4. and I have noticed the same behavior. Am I doing something wrong?
Thank you in advance
I forgot to mention that I can see the logs of UPnPServiceImpl:
>>> Shutting down UPnP service...
<<< UPnP service shutdown completed
which indicates that the service must have properly shut down.
I've found some solution, but it was unfortunately some problem inside the cling library. some colluegue of mine did the fix, I'm not able to share the "patches library" and it's not clear what changes were affected. We used a patched version of: cling-distribution-2.0.1
So possibly with latest lib it's also already fixed? Good luck! Did u test it already with 2.0.1?
So problem was: successful run from library code:
error run was something like this: