Jump to content

Android TV Intent URL - direct playback


Go to solution Solved by Luke,

Recommended Posts

Posted

Hi Everyone!

I am new here, thank you for adding me,

 

I am working on an app that uses android intents to launch apps and I am integrating the emby app to this.
My Intents are working properly and all, but I cannot find anything about directly starting a movie through a contentId. With tv.emby.embyatv/play/103 i am only going to the information screen of the movie,

How do I go about directly starting it?

 

I got these intent working fine and everything,

intent://tv.emby.embyatv/startapp##Intent;scheme=embyatv;package=tv.emby.embyatv;end

intent://tv.emby.embyatv/play/103##Intent;scheme=embyatv;package=tv.emby.embyatv;end


I know the Roku uses the argument &Command=PlayNow in the url, but I only get a black screen when I add it to my android intent.

Netflix uses parameters e.g. S.source

intent://www.netflix.com/watch/60000724##Intent;scheme=https;package=com.netflix.ninja;S.source=30;end

 

Thank you in advance,

If someone can point me in the right direction would be greatly appreciated!! Thank you

 

Kind Regards

 

Posted

Hi.  Can you try searching for our standard android app (Just "Emby" on Amazon and "Emby for Android on Google) on the same device's app store and see how that compares?

Thanks.

 

Posted

intent://tv.emby.embyatv/play/103##Intent;scheme=embyatv;package=com.mb.android;end

 

unfortunatly, the android version has the same behaviour, gets me to the movie informational, instead of directly starting playback

Posted

I have gotten the intents working this morning with the android version:
intent://items/{PLAYER_ID}/{CONTENT_ID}##Intent;scheme=emby;package=com.mb.android;end

It goes to the app, just not the content. But I guess it follows a bit the emby://items?serverId={SERVER_ID}&itemId={ITEM_ID}

Posted

correction, only emby://items/

any other pages and/or arguments doesn't matter, just opens the app.
/Sessions, no go. /Sessions/player_id/Playing no go. /Sessions/player_id/Playing&PlayCommand=PlayNow&ItemIds={{ItemId}}, also nothing 

Posted

I can send commands to the client through the server,
http://{{IP}}:8096/emby/Sessions/{{PLAYER_ID}}/Playing?ItemIds={{CONTENT_ID}}&PlayCommand=PlayNow&X-Emby-Token={{TOKEN}}

 

But the app needs be in the fore ground... it doesn't automattically open up the app on the nvidia shield,
Is there setting in the server to start the app?

 

Posted
4 minutes ago, Tim1986 said:

Is there setting in the server to start the app?

Hi.  No, there is no way for the server to know how to do that.

Posted

{        
"source_id": 0,        
"name": "Emby",        
"type": "app",
"ios_url": "emby://items?serverId={{SERVER_ID}}&itemId=103",        
"app_deeplinks": {
    "roku": {
        "content_id": "103",
        "media_type": null,
        "app_id": 44191
        }
    }, 
}

I haven't tried iOS devices yet, but Roku players just works out the box with their webserver, by just sending a deeplink to the webserver on the device. Having so much trouble getting the android to work.
Surely (please dont call me shirley 😜), I don't have to make make a webserver to check which packages are running, (if emby is not running) set emby to the foreground and if it is, send an http request to the server to start a movie on that same client, where i am sending the request from? That can't be right, right? Just trying to figure it all out, Maybe i am overlooking something, or haven't found any documented command. Looking everywhere, just hoping i am dont have to go the above mentioned way,

I know you are moving away from the android TV one, but have only gotten emby://items to respond
Android TV:
embyatv://tv.emby.embyatv/direct/1000
 Leads me to the live tv page

embyatv://tv.emby.embyatv/play/{{CONTENT_ID}}
 Leads me to the movie information page

embyatv://tv.emby.embyatv/play/{{CONTENT_ID}}&PlayCommand=PlayNow
 Give me a black screen
embyatv://tv.emby.embyatv/play/{{CONTENT_ID}}&ControlCommand=PlayNow
 Give me a black screen
embyatv://tv.emby.embyatv/play/{{CONTENT_ID}}&Command=PlayNow
 Give me a black screen


For the Android:
emby://items/
 Leads me to the home screen

  • Solution
Posted

HI, with Emby for Android, we'll add support for this for the next update:

emby://play/{serverID}/{ItemID}

 

Posted

That would be AWESOME!!!
I was wrecking my brain, about this one. adb dumpsys, checking everything, Great to hear, that would make the programming SO much simpler.

Thank you very much, awaiting with eagerness for that update! 😃

 

  • Thanks 1
Posted
On 11/21/2024 at 3:09 AM, Tim1986 said:

That would be AWESOME!!!
I was wrecking my brain, about this one. adb dumpsys, checking everything, Great to hear, that would make the programming SO much simpler.

Thank you very much, awaiting with eagerness for that update! 😃

 

 

  • Thanks 1
Posted

That was quick my man!! Great support, first thing I will do monday morning! Keep ya posted! Thanks so much!

  • Like 1
  • Thanks 1
Posted

Thanks a bunch, you guys.

Tested the arm7 and arm64 on the nvidia shield 2019 pro and both same behaviour and both working.

😃

If I find an android device for the x64/x86 version, I will see if I can test those also. But so far both arm are good!

  • Like 1
  • Thanks 1
  • 3 weeks later...
Posted
On 11/20/2024 at 10:58 PM, Luke said:

HI, with Emby for Android, we'll add support for this for the next update:

emby://play/{serverID}/{ItemID}

 

Awesome! Is there a way to initiate shuffle on a specific TV Show?

Posted
24 minutes ago, evilpig said:

Awesome! Is there a way to initiate shuffle on a specific TV Show?

I guess we'd have to add a shuffle variation on that.

  • Like 1
Posted
1 minute ago, Luke said:

I guess we'd have to add a shuffle variation on that.

That would be great if possible. I have a show we turn on at night and fall asleep to. Using Home Assistant I am able to set a sleep timer on my tv, slowly dim the lights, but the last step for automation is to open this show, and start a shuffle haha.

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...