You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
I have an app which is connecting to the bridge as usual -> means that I implemented the connection like in the example (http://www.developers.meethue.com/documentation/java-sdk-getting-started#connectingToABridge).
My app is using a BroadcastReceiver, so it is waking if some events come up. Is this BroadcastReceiver I want to connect to the bridge and do some color changes. The problem is now that it is sometimes not possible to connect because the other part of the app is already connected to the bridge.
I get no error message but it seems to be that the method phHueSDK.isAccessPointConnected(lastAccessPoint) is hanging and do nothing.
Any suggestions how to solve these multiple connect to one bridge?
Thanks!
tomu
The text was updated successfully, but these errors were encountered:
It's a bit tricky this one without seeing your code. Nothing immediately springs to mind.
The PHHueSDK is a singleton, so what you are doing should work in theory, providing you have not disconnected from the SDK.
The isAccessPointConnected method loops through the connected bridges, comparing the IP Address in the Bridge Config with the IP Address in the passed lastAccessPoint object. I can't really see how this can hang. Are you sure you are not getting any Exceptions/Errors in LogCat?
When the BroadcastReceiver wakes up, can you add a check to see if
PHHueSDK.getInstance().getSelectedBridge() is null or not
This will at least test to see if your PHSDK singleton is still alive.
Hi,
I have some special requirements.. ;)
I have an app which is connecting to the bridge as usual -> means that I implemented the connection like in the example (http://www.developers.meethue.com/documentation/java-sdk-getting-started#connectingToABridge).
My app is using a BroadcastReceiver, so it is waking if some events come up. Is this BroadcastReceiver I want to connect to the bridge and do some color changes. The problem is now that it is sometimes not possible to connect because the other part of the app is already connected to the bridge.
I get no error message but it seems to be that the method phHueSDK.isAccessPointConnected(lastAccessPoint) is hanging and do nothing.
Any suggestions how to solve these multiple connect to one bridge?
Thanks!
tomu
The text was updated successfully, but these errors were encountered: