ConnectSDK / Connect-SDK-Android

Android source project for Connect SDK
Apache License 2.0
308 stars 130 forks source link

Why Chromecast is not discovered on the First Attempt and always when App is reopened #400

Open drmuzaffarkhan opened 1 year ago

drmuzaffarkhan commented 1 year ago

I am seeing that Chromecast is not discovered on its first attempt when app is opened and only dial is discovered, but when app is closed and reopened then the chromecast gets discovered

harimoradiya commented 1 year ago

Can you provide your log and code?

drmuzaffarkhan commented 1 year ago

Thank you for your email, this is resolved

On Fri, 15 Sept 2023 at 15:04, Hari Moradiya @.***> wrote:

Can you provide your log and code?

— Reply to this email directly, view it on GitHub https://github.com/ConnectSDK/Connect-SDK-Android/issues/400#issuecomment-1721013474, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7U4P2SOZTCS6RVHWADJEATX2QRZTANCNFSM6AAAAAAXYEDA2I . You are receiving this because you authored the thread.Message ID: @.***>

bettimms commented 9 months ago

@drmuzaffarkhan how did you solve this? I'm having the same issue?

drmuzaffarkhan commented 3 months ago

Just add this: if (isNew) { foundService = new ServiceDescription(CastService.ID, uuid, castDevice.getIpAddress().getHostAddress()); foundService.setFriendlyName(castDevice.getFriendlyName()); foundService.setServiceID(CastService.ID); listUpdateFlag = true; isNew = false; }

above the if (!isNew) in the CastDiscoveryProvider and all should be solved.