Amazon Prime Video on Demand on Android TV Devices

Status
Not open for further replies.
Search This thread

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
Full write up on the project here:
https://www.linkedin.com/pulse/prime-video-launcher-android-tv-solution-will-blaschko-ma

Screenshots:
AAEAAQAAAAAAAAP-AAAAJDRjZjg2Y2JiLWIwYjAtNGUzMy04NDliLTk2ZDhiZjBmZjNiNw.png

AAEAAQAAAAAAAAYVAAAAJGU0MzdiNWQyLTUxZmMtNGQ2OS1iNzJhLTVjMjJlYzYxMTRmMQ.png

AAEAAQAAAAAAAAbNAAAAJDNjZTU1ZmEzLTI3M2EtNGQxNC05ZmFiLTgwODQ2NDFhODcxYg.png

AAEAAQAAAAAAAAVKAAAAJDQ1NDQ5MDI4LTAzODktNGI0Zi05M2ZjLTY5Y2Y2NDc0MGI4MQ.png
 

nobo2k

Member
Dec 11, 2007
19
6
Hey there,

thank you very much for the great work!
Unfortunately it does not work for me - but this must be an issue with having a German Amazon Prime Account ?
Do you think you can enable settings to also include other countries for it?

Also different issue:
I now tried to use the amazon video application and browsed the shop via RF mouse and keyboard... but whenever I select a movie to play I always get the error: Amazon Video has stopped. So it crashes on me :(
 
  • Like
Reactions: will.blaschko
Nice work, works fine here. Unfortunately no HD, or UHD. Fortunately I have 4k amazon on my TV but would love to have on the shield. Amazon needs to stop making money selling android and then hosing all other android devices. They are only hurting their customers. I have prime, let me watch it where I want. I tried a 4k firetv, it was garbage for everything but amazon video. This is why content vendors should not play in the hardware market... they get confused ;)

anyway, nice work. App works great.
 
  • Like
Reactions: TIME2DEV

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
Hey there,

thank you very much for the great work!
Unfortunately it does not work for me - but this must be an issue with having a German Amazon Prime Account ?
Do you think you can enable settings to also include other countries for it?

Also different issue:
I now tried to use the amazon video application and browsed the shop via RF mouse and keyboard... but whenever I select a movie to play I always get the error: Amazon Video has stopped. So it crashes on me :(
@nobo2k I'll see if I can add German support to it, I'll check how the api I used handles Amazon.de. I'll have to add settings in the launcher app too. I'll try to add all the locations Amazon supports, but it might take a few days. I'll ping you with the update :)
 

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
Nice work, works fine here. Unfortunately no HD, or UHD. Fortunately I have 4k amazon on my TV but would love to have on the shield. Amazon needs to stop making money selling android and then hosing all other android devices. They are only hurting their customers. I have prime, let me watch it where I want. I tried a 4k firetv, it was garbage for everything but amazon video. This is why content vendors should not play in the hardware market... they get confused ;)

anyway, nice work. App works great.
There are settings pages the Amazon VOD app manifest exposes that allow you to change streaming settings for video and audio (but I think it maxes at 1080p high quality). When I'm adding international support I'll try to expose direct access to those settings as well :).
 

earl.grey

Member
Dec 11, 2010
21
3
It would be great If you add german amazon prime video. I would be eternally thankful. Will check this thread regular ! Thanks man
 

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
It would be great If you add german amazon prime video. I would be eternally thankful. Will check this thread regular ! Thanks man
@earl.grey & @nobo2k the new APK should have support for Amazon Prime Germany, in theory. The intents and data seem to be working correctly, but I don't have a German Prime account to test video playback with. Let me know if this works for you, if not, we'll figure something out.
@gottahavit I've exposed the video settings page of the Amazon VoD app, it's possible to change the settings to "Best," but I think that's still just 1080p high quality. I think it looks better than the default settings. The link is below all the video feeds in the "Settings" section.
 

DaveTheRave

Member
Sep 29, 2007
19
9
Clovis
Keep up the amazing work

Awesome job, Will! You're definitely on the right track with this app, I read your full write up and I was surprised how far you've come in such a short amount of time!

That said, there's a few limitations to the current app and it would be nice to get an issue tracker going for this project (assuming you want to keep developing it!)
For example, there seems to be a considerable amount of Prime Video content missing, as the search seems to be limited to only the content displayed on the launch screen. It would be nice to expand upon this

Also I was curious to know why you recommend using the 2.0.45 version of Amazon VOD app instead of the latest 3.0.63 and version 5.4.3 of Amazon Shopping instead of 6.1.4.
If I had to guess I'm assuming only the older versions allow you to build an app like this but I'm wondering if there's any tradeoffs (aka newer versions support better video quality, more titles, etc)

Thanks again for the hard work!
 

xaudiblex

Senior Member
Apr 20, 2008
303
66
You have done an amazing job on this app! By any chance, can you get close captions to work?
I figured it out. You just have to enable it for one video in the original app, and it enables it for all other videos.

Also, would it be possible to add purchased videos to view in this app?

Thanks again!
 
Last edited:

sidamos77

Senior Member
Nov 8, 2012
667
149
Thanks for the cool idea and the effort. Unfortunately, it does not work yet for me (Amazon Germany, NVIDIA Shield TV).

The 1.1 version gets rid of the "wrong account" error message. But Instant Video crashes when trying to play a video. This also happened with some of my own tries of various Amazon Video versions (without your launcher). This may have to do with the Shield TV.

In the settings, I can only choose the quality for mobile or to use WiFi only. Also, the quality of the "SD download". It's essentially the same as on my tablet. I don't know, if this will be 1080p.

After choosing a better quality, it does not crash anymore on playback, but just does nothing.

Also, it would be nice to see my own watchlist in your launcher.

Another idea: Maybe using the official Android TV version (for Sony TVs) would be a better foundation?

Thanks!
 
Last edited:

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
I'm taking a few days' vacation starting today. Please keep adding issues as you find them and I'll do my best to address what I can when I get back.

I used those versions of the player and store because that's what I had on hand, if someone wants to experiment with newer versions to see if they work better, please do and let me know. It should just be the VOD app, the store shouldn't matter.

I'll see if the Sony TV app has the same intents available, but it's less likely.

I can't add personalized content as is, because I'm not actually accessing your account. I could open the search function to everything however, not just free content.

I'll keep experimenting when I get back :). Would love suggestions.
 

Orbiting234

Senior Member
Sep 16, 2010
327
96
Also I was curious to know why you recommend using the 2.0.45 version of Amazon VOD app instead of the latest 3.0.63 and version 5.4.3 of Amazon Shopping instead of 6.1.4.

Ha ha ha, was about to ask the very same thing!

Anyways, to will.blaschko: many many thanks for the work you've done already. Always annoyed me not being able to play AIV on Android TV devices. Those few days over the summer where the app from Sony TVs worked spoiled me.
 

sidamos77

Senior Member
Nov 8, 2012
667
149
Amazon Germany, NVIDIA Shield TV.

Sometimes it plays, most of the time it does silently not (same video). When it does not, I see this exception in logcat:

Code:
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): CRASH HAS OCCURRED
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): java.lang.RuntimeException: java.lang.NullPointerException: The view cannot be found by given id: audiotrack_language_list
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.events.proxy.EventInvocation.doInvoke(EventInvocation.java:68)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.events.proxy.EventInvocation.access$000(EventInvocation.java:17)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.events.proxy.EventInvocation$1.run(EventInvocation.java:44)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at android.os.Handler.handleCallback(Handler.java:742)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at android.os.Handler.dispatchMessage(Handler.java:97)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at android.os.Looper.loop(Looper.java:135)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at android.app.ActivityThread.main(ActivityThread.java:5314)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at java.lang.reflect.Method.invoke(Native Method)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at java.lang.reflect.Method.invoke(Method.java:372)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): Caused by: java.lang.NullPointerException: The view cannot be found by given id: audiotrack_language_list
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.util.ViewUtils.findViewById(ViewUtils.java:196)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.audiotrack.views.DefaultAudioTrackMenuPresenter.initialize(DefaultAudioTrackMenuPresenter.java:62)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.audiotrack.views.AudioTrackMenuController.onPlaybackStart(AudioTrackMenuController.java:161)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature.onPlaybackStart(PlaybackAudioTrackFeature.java:162)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature.access$000(PlaybackAudioTrackFeature.java:61)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature$1.onStart(PlaybackAudioTrackFeature.java:310)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.playbackclient.listeners.PlaybackStateEventListenerProxy.onStart(PlaybackStateEventListenerProxy.java:22)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at java.lang.reflect.Method.invoke(Native Method)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at java.lang.reflect.Method.invoke(Method.java:372)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  at com.amazon.avod.events.proxy.EventInvocation.doInvoke(EventInvocation.java:59)
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990):  ... 10 more
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): Collecting details and saving to disk
V/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): =========================
I/com.amazon.device.crashmanager.AppFileArtifactSource( 3990): Saving crash report to file: /data/data/com.amazon.avod.thirdpartyclient/files/crashlog.v2.amzcl6fcc53ca881e351f433a43a45b7fda737e278df5
E/AndroidRuntime( 3990): Process: com.amazon.avod.thirdpartyclient, PID: 3990
E/AndroidRuntime( 3990):        at com.amazon.avod.events.proxy.EventInvocation.doInvoke(EventInvocation.java:68)
E/AndroidRuntime( 3990):        at com.amazon.avod.events.proxy.EventInvocation.access$000(EventInvocation.java:17)
E/AndroidRuntime( 3990):        at com.amazon.avod.events.proxy.EventInvocation$1.run(EventInvocation.java:44)
E/AndroidRuntime( 3990):        at com.amazon.avod.util.ViewUtils.findViewById(ViewUtils.java:196)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.audiotrack.views.DefaultAudioTrackMenuPresenter.initialize(DefaultAudioTrackMenuPresenter.java:62)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.audiotrack.views.AudioTrackMenuController.onPlaybackStart(AudioTrackMenuController.java:161)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature.onPlaybackStart(PlaybackAudioTrackFeature.java:162)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature.access$000(PlaybackAudioTrackFeature.java:61)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.audiotrack.PlaybackAudioTrackFeature$1.onStart(PlaybackAudioTrackFeature.java:310)
E/AndroidRuntime( 3990):        at com.amazon.avod.playbackclient.listeners.PlaybackStateEventListenerProxy.onStart(PlaybackStateEventListenerProxy.java:22)
E/AndroidRuntime( 3990):        at com.amazon.avod.events.proxy.EventInvocation.doInvoke(EventInvocation.java:59)

I do not get the "Instant Video has crashed" message box anymore, not even after deleting data of all 3 apps.

One more thing:
When I enter Instant Video Settings the first time, I do not see the audio language setting, only 2 settings for video quality.
When I enter Instant Video Settings the second tine, I see audio language setting and it is set to german. When I open it and set it to english, I cannot set it back to german. I have to delete the data of the launcher.
 
Last edited:

ludanatic

Member
Sep 26, 2011
43
4
Thanks for the cool idea and the effort. Unfortunately, it does not work yet for me (Amazon Germany, NVIDIA Shield TV).

The 1.1 version gets rid of the "wrong account" error message. But Instant Video crashes when trying to play a video. This also happened with some of my own tries of various Amazon Video versions (without your launcher). This may have to do with the Shield TV.

In the settings, I can only choose the quality for mobile or to use WiFi only. Also, the quality of the "SD download". It's essentially the same as on my tablet. I don't know, if this will be 1080p.

After choosing a better quality, it does not crash anymore on playback, but just does nothing.

Also, it would be nice to see my own watchlist in your launcher.

Another idea: Maybe using the official Android TV version (for Sony TVs) would be a better foundation?

Thanks!

Just tried to install the 3 given apks and everything is working as supposed.
I'm from Germany too so i guess the problem must be another in your case.

The only issue i have got so far is, that after i watched a movie i cannot load another one. If thats the case for you too, try to delete the data from the Shop and Instant Video Apps and sign in again :)
 

sidamos77

Senior Member
Nov 8, 2012
667
149
Yes, correct, it works one time, sometimes with correct language, sometimes not.

Second time, I get the exception above (sometimes with crash message box, sometimes not).

So, it is something with the audio language, I guess.

When I use search to find a show, it seems to find the english version, although I have set locale to Germany in the launcher.
 
Last edited:

will.blaschko

Senior Member
Dec 25, 2015
162
231
Seattle, WA
plus.google.com
Yes, correct, it works one time, sometimes with correct language, sometimes not.

Second time, I get the exception above (sometimes with crash message box, sometimes not).

So, it is something with the audio language, I guess.

When I use search to find a show, it seems to find the english version, although I have set locale to Germany in the launcher.
If you wanted to try a few other VOD versions from APK mirror, maybe it's an issue with the old APK not working with the current server settings for certain videos.

If not, I'll see which is the most recent that works when I get back. The marshmallow APK didn't work, I found. It crashed every time I launched. The one posted is the only other one I tried.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 61
    Admin note: by the request of Amazon, we have removed the attached files. Please refrain from reposting. Thread closed.
    10
    Its weird. The option has always been there and even if you toggle it, the quality still plays in SD. Ironically, if you play the same video, in the chrome browser, on the Shield TV, the quality is night and day better.

    I've figured out how to play the video in an embedded browser, would this be preferable to launching the Amazon app? It would significantly lower the dependency on the other APK, that's for sure.

    Maybe I can make it an option on first launch?
    7
    Hi there
    anyone have seen a working eu (de) version anywhere out there?
    Update of my TV got released yesterday and I just pulled this from my TV and did a quick test on my shield.
    Could login and it said that my sony got successfully connected. :D


    EDIT: Grab the APK at APKmirror
    Same MD5 as mine and they verified the signature.

    THX
    Chaos
    6
    What about using the attached APK? This was the original one that worked on the Nexus Player (from the sony android tv) before Amazon changed something to disable it.

    Just a thought.

    Thanks again for all the work!

    Doing a quick decompile of that app (and ~20 minutes browsing).

    In MainActivity, this section is amusing (that error should never be thrown):
    Code:
    signedAsExpected = true;
    if (!signedAsExpected) { ... throw error... }

    Otherwise, it looks like the following issues are present:
    • The app is checking the signing key against a known signature retrieved from the web, I think this came up with previous development work (https://www.airpair.com/android/posts/adding-tampering-detection-to-your-android-app for a local example)
    • The app is checking the application version, Amazon could have set this to always return "expired"
    • The app is checking the device information, if the above is not true, this will have to be faked in some convincing way--either editing device properties (which could break other things) or changing the source
    • Decompiling and signing the APK again might break compatibility with x86 devices using Houdini to interpret ARM commands (I'm not 100% on how this works, exactly)

    I thought I could walk around this check, but even forcing a video to play (via the adb command "adb shell am start -n com.amazon.aiv.us/com.amazon.avod.playbackclient.EdPlaybackActivity -e asin B008Y7Y6QU") gives me a LICENSE_ERROR--I received a different error before logging in to Amazon. I think they just plain revoked the license distributed with this device (if we got around the signing issue, could we drop the mobile license in?).

    None of the other activities listed in the Manifest offer anything that seems immediately useful.

    Other points of interest:

    TLDR:
    It looks really unlikely that we'll be able to use the Sony TV app as the basis for further efforts unless we hijack calls to authenticate both the signing key (I'm pretty sure this is a remote check, not a local one) and maybe the license verification. Even then, we'll have to be able to find a compatible license (mobile app?) and put it into the APK.

    I don't want to repeat too much of the research that has already been done with this particular APK, but you'll find some of the efforts online, both in XDA and other places. Basically the app would require an entire rewrite plus some fancy local network tricks (beyond the layman's ability to sideload an APK). Efforts might be better off seeing if we can find and port the settings that allow 4k video into the mobile app--then again that information might be tied to the license.