question

Alexs20 avatar image
Alexs20 asked

New Fling-SDK doesn't work when targetSdkVersion set to 30

I tested that with my app and with example code provided in
AmazonFling-SDK\android-sdk\samples\CastWithFlingExample\CastWithFlingExample

It returns error when it ties to cast any media source (see below)

but it runs perfectly fine when I downgrade targetSdkVersion to 29

I ran that test on Pixel 3a XL



2020-11-14 17:40:27.439 25487-25636/com.amazon.whisperplay.example.fling D/WhisperLink: Connection - Exception in connection:null
    com.amazon.whisperlink.exception.WPTException
        at com.amazon.whisperlink.util.Connection.doConnectOnce(Connection.java:679)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:587)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:537)
        at com.amazon.whisperlink.util.Connection.connect(Connection.java:380)
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:457)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
2020-11-14 17:40:27.440 25487-25636/com.amazon.whisperplay.example.fling W/WhisperLink: Connection - No route to service :Description(sid:amzn.thin.pl, friendlyName:null, accessLevel:0, security:0, flags:0, version:0): on device :[device: local=false, uuid=941CD0F6E4DCBD7A4B347D9DEFA0DFE7]
2020-11-14 17:40:27.441 25487-25636/com.amazon.whisperplay.example.fling W/WhisperLink: Connection - Exception in connection. Exception code :1 :class com.amazon.whisperlink.exception.WPTException :com.amazon.whisperlink.exception.WPTException
2020-11-14 17:40:27.441 25487-25636/com.amazon.whisperplay.example.fling D/WhisperLink: Connection - calling Connection.close for device() [device: local=false, uuid=941CD0F6E4DCBD7A4B347D9DEFA0DFE7, routes={inet=Route(ipv4:192.168.1.200, unsecurePort:46193, securePort:41923)}]
2020-11-14 17:40:27.442 25487-25636/com.amazon.whisperplay.example.fling E/PlayerDeviceImpl: Exception: 
    com.amazon.whisperlink.exception.WPTException: com.amazon.whisperlink.exception.WPTException
        at com.amazon.whisperlink.util.Connection.throwIfNetworkError(Connection.java:804)
        at com.amazon.whisperlink.util.Connection.doConnectOnce(Connection.java:725)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:587)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:537)
        at com.amazon.whisperlink.util.Connection.connect(Connection.java:380)
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:457)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: com.amazon.whisperlink.exception.WPTException
        at com.amazon.whisperlink.util.Connection.doConnectOnce(Connection.java:679)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:587) 
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:537) 
        at com.amazon.whisperlink.util.Connection.connect(Connection.java:380) 
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:457) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 
2020-11-14 17:40:27.442 25487-25636/com.amazon.whisperplay.example.fling D/WhisperLink: Connection - calling Connection.close for device() [device: local=false, uuid=941CD0F6E4DCBD7A4B347D9DEFA0DFE7, routes={inet=Route(ipv4:192.168.1.200, unsecurePort:46193, securePort:41923)}]
2020-11-14 17:40:27.442 25487-25636/com.amazon.whisperplay.example.fling E/FlingActivity: Cannot set status listener
    java.io.IOException: Cannot add StatusListener
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: com.amazon.whisperlink.exception.WPTException: com.amazon.whisperlink.exception.WPTException
        at com.amazon.whisperlink.util.Connection.throwIfNetworkError(Connection.java:804)
        at com.amazon.whisperlink.util.Connection.doConnectOnce(Connection.java:725)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:587)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:537)
        at com.amazon.whisperlink.util.Connection.connect(Connection.java:380)
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:457)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 
     Caused by: com.amazon.whisperlink.exception.WPTException
        at com.amazon.whisperlink.util.Connection.doConnectOnce(Connection.java:679)
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:587) 
        at com.amazon.whisperlink.util.Connection.doConnect(Connection.java:537) 
        at com.amazon.whisperlink.util.Connection.connect(Connection.java:380) 
        at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:457) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 
fire tvsdk
10 |5000 characters needed characters left characters exceeded

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

Levon@Amazon avatar image
Levon@Amazon answered

Hi Alexs20,

For the time being, if there are no specific issues for you to target SDK 29, I would suggest to use that one, while the Fling team is reviewing the upleveling to SDK 30+. Thanks!

10 |5000 characters needed characters left characters exceeded

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

Alexs20 avatar image
Alexs20 answered

That's fine to target SDK 29 for now, but just FYI that your team has less than year to level it up ;)
https://developer.android.com/distribute/play-policies#APILevel30
Thanks

10 |5000 characters needed characters left characters exceeded

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

Jim Holland avatar image
Jim Holland answered

What is the status of this one? It has been more than a 6 months when this was reported. API level 30 is still broken and it has been quite a few months. And like Alexs20 pointed:

//--------------------

When you upload an app bundle or APK, it needs to meet Google Play’s target API level requirements. By August 2021, new apps must target at least Android 11 (API level 30). By November 2021, all apps that are being updated must target at least Android 11 (API level 30). Until then, new apps and app updates must target at least Android 10 (API level 29). Wear OS apps are not subject to these new requirements.

3 comments
10 |5000 characters needed characters left characters exceeded

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

Hi there,

Thanks for posting. The Fling SDK team is currently working on upleveling. I will update this thread when it's available, and you can also keep an eye on the SDK downloads page:
https://developer.amazon.com/docs/apps-and-games/sdk-downloads.html#fling

0 Likes 0 ·

Any news ?


The cause of the failure is com.amazon.whisperlink.port.android.transport.TExternalSocketFactory.getCurrentInetRoute() returning null. That's because it makes use of NetworkInterface.getHardwareAddress() (mac address) which returns null on Android 11+.

So the code must be updated to work without a mac address.

0 Likes 0 ·
Any updates on this? In one week all apps have to target API 30.
0 Likes 0 ·
Carlos Solorzano avatar image
Carlos Solorzano answered

Any news on this issue? All apps have to update by November to API level 30.

10 |5000 characters needed characters left characters exceeded

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

Jim Holland avatar image
Jim Holland answered

It is a week until November 1st and still no fix for this? Is Fling dead ?

10 |5000 characters needed characters left characters exceeded

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

2kit consulting avatar image
2kit consulting answered

Dear Levon@Amazon, are there any plans on fixing this soon or in the future?

As explained by the other devs, updating Android apps on Google Play will require API level 30 by November and break Fling.


10 |5000 characters needed characters left characters exceeded

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

Stefan Lilov avatar image
Stefan Lilov answered

We are facing the same issue with our app. As Google requires new updates to be build with target SDK = 30 this becomes a must. For the time being we disabled this feature as it makes no sense to have it active when it is consistently crashing.

10 |5000 characters needed characters left characters exceeded

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

Joshua Longbrake avatar image
Joshua Longbrake answered

We are experiencing the same/or similar issues after update of Amazon Fling SDK to 1.4.0 and using an app that requires Android SDK 30. This is a show stopper for us, so please update as to the potential fix/update and or provide a workaround for being able to continue to cast to FireTV devices from Android ADK 30+ applications.

Is this package/service/maintenance discontinued?

10 |5000 characters needed characters left characters exceeded

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