How can I properly discover a Fire TV device based on its cutom player service id?

I am developing a Fire TV app and I have spent a lot of time trying to figure out how to get the app to support casting via the MediaRouter API (Using Amazon Fling with Android MediaRouter | Fling SDK). I haven’t had any success and I am not sure whether I am doing something incorrectly or if the Fling SDK is broken (I am using version 1.6.3). I have more details about what I have tried in a Stack Overflow question here:

I want to be able to discover a Fire TV device with my receiver app installed and then use either Google cast or Fling APIs to control playback on the receiver app. But it seems that the sender app cannot find the custom player on the Fire TV device. The docs make it sound like this should be possible, but maybe I am misunderstanding something?

If this isn’t possible, does the Fling SDK expose the local IP address of the devices? I previously developed a method of controlling the receiver app via a direct TCP connection, but switched to using the Fling SDK because my method of device discovery was unreliable and I wanted to be able to launch/install the receiver app from the sender app. But at this point, if I could just use the Fling SDK device discovery and then communicate directly with a discovered device with the receiver app already running, this would be acceptable. Any help would be greatly appreciated.

Hi jmg,

Welcome to the forums and thanks for posting! Could you please specify what device models / OS versions are used with both the sender and receiver apps?

Thanks for the response. After trying device discovery again after a week, it randomly seems to work. I have no idea what if anything changed since the last time I tried device discovery (I didn’t change any code but it is possible a device updated).

1 Like