question

Adrian avatar image
Adrian asked

Fling SDK - fling multiple times not working

Hello,

I am developing an app using them Fling SDK. The main functionality is pretty simple, the user starts the app on a Fire TV and waits for a signal from a mobile device (Android or iOS).

Everything worked as expected (the user was able to find Fire TV Sticks in their local area network and they were able to set the media source from the mobile device).

In our case, the user should be able to setMediaSource multiple times and override the content displayed on the Fire TV Stick.

Sometimes, the Fire TV Stick app does not take any signal from the mobile phone (most often from the iOS app)

Some things noticed - when setMediaSource does not work, the Fire TV Stick app returns the following warnings / exceptions in logcat:

1. 2018-12-12 09:07:16.321 1211-1264/? W/Binder: Binder call failed. android.os.RemoteException at com.amazon.client.metrics.AndroidMetricsServiceAdapter$InternalMetricsService.permissionCheck(AndroidMetricsServiceAdapter.java:313) at com.amazon.client.metrics.AndroidMetricsServiceAdapter$InternalMetricsService.recordWithChannel(AndroidMetricsServiceAdapter.java:245) at com.amazon.client.metrics.IMetricsService$Stub.onTransact(IMetricsService.java:83) at android.os.Binder.execTransact(Binder.java:565) Caused by: java.lang.SecurityException: Permission denied

2. E/TComm.MessageRouterImpl: registerMessageHandler - duplicate registration; channel: 22250

3. 8-12-12 09:07:16.323 3680-4967/com.amazon.whisperplay.fling.media.myapp E/MediaPlayer: stop called in state 1, mPlayer(0x0) 2018-12-12 09:07:16.323 3680-4967/com.amazon.whisperplay.fling.media.myapp E/MediaPlayer: error (-38, 0) 2018-12-12 09:07:16.323 3680-3680/com.amazon.whisperplay.fling.media.myapp E/MediaPlayer: Error (-38,0) 2018-12-12 09:07:16.323 3680-3680/com.amazon.whisperplay.fling.media.myapp E/CustomMediaPlayerImpl: MediaPlayer error:-38 extra:0

I am testing the app using a new Fire TV Stick 4k. Please note that this issue can be also reproduced on older Fire TV Sticks.

In order to test the app, I am installing the APK using Downloader app or directly from Android Studio by using ADB

Thank you!

sdkamazon fling
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi Adrian,

This is being investigated already, as part of the question you submitted earlier: https://forums.developer.amazon.com/questions/193747/fling-sdk-setmediasource-multiple-times-not-workin.html

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.