Android Phone as Remote Control for Android Tv Device, using WIFI

592 views Asked by At

Android Tv remote, pairing connection and utilization of Connect SDK to operate keys.

I'm working to develop android App that is use as a TV-REMOTE-CONTROL over same Wifi,

For this I'm using and following guidelines by Connect-SDK-For-Android documented here (https://connectsdk.com/en/latest/). I'm utilizing sample provided to test the SDK provided here Connect SDK Android Sample. I found this method is simple and fast to be achieve my requirement.

Issue why I'm here that Connect SDK is calling for TV Capabilities to perform remote functions, when I run this code it is showing me connected TV's list over same WIFI. But when I choose or select TV option it directly connect to TV without asking for pairing code that should be enabled on TV. Indirect connection it only allows me to change TV VOLUME through connected protocol.

Secondly, Connect SDK is using multiple service's like Chromecast, DIAL, DLNS etc.; for single device and when listing Connected TV, it list single TV multiple times depending on Services enabled.

I required to enable Number Keys and Key Control (up,down,right,left) Power Control Key, Connect-SDK utilizing CapabilityMethods and other interfaces to enable the all keys functionality.

I required guide how could I achieve my required functionality TV-Remote-Control, any other way to get my solution would be appreciated but I'm prioritizing Connect-SDK method.

1

There are 1 answers

0
user23305318 On

Unfortunately, there's not much support online for ConnectSDK. I'm making a TV remote app myself on Github. I'm having to figure much of it out for myself also. Is your code on github?

Regarding it showing the same device multiple times, the way I solved it was to create a "deviceKey". It's basically a string variable. I combined the device name + the IP address into the variable and unless each deviceKey is unique and different, it won't be added into my deviceList array. That's where all I stored all the Connectable devices found by discovery manager.