odyshewroman / AndroidTVRemoteControl

MIT License
28 stars 8 forks source link

I'm already connected to Android TV. But I want to show the code on TV again. Is there any way to help me? #26

Open Sakurathanh2003 opened 2 months ago

HarshadTechmero commented 2 months ago
func connect(host: String) {
            queue.async {
                self.remoteManager.stateChanged = { [weak self] remoteState in
                    self?.remoteStateChanged?(remoteState.toString())  }

                self.pairingManager.stateChanged = { [weak self] pairingState in
                    self?.pairingStateChanged?(pairingState.toString())

                    if case .successPaired = pairingState {
                        self?.remoteManager.connect(host)
                    }
                }

                self.pairingManager.connect(host, "client", "iPhone")
            }
    }

You Can Try This

Sakurathanh2003 commented 2 months ago

@HarshadTechmero thanks

HarshadTechmero commented 2 months ago

@Sakurathanh2003 have you work with ScreenMirroring?

Sakurathanh2003 commented 2 months ago

@HarshadTechmero you can use google-cast-remote-display-sdk to cast screen.

vikashkumar2804 commented 2 months ago

HI @HarshadTechmero / @Sakurathanh2003 I am facing an issue with my connection to Sony TV, could you please provide an updated sample app with proper certificates.

HarshadTechmero commented 2 months ago

@vikashkumar2804 you can check this ticket https://github.com/odyshewroman/AndroidTVRemoteControl/issues/9#issue-2018991865 I hope this one is helps for you