Jump to content


Photo

Add activities to Android TV app


  • Please log in to reply
6 replies to this topic

#1 IkeTaylor11 OFFLINE  

IkeTaylor11

    Advanced Member

  • Members
  • 384 posts
  • Local time: 07:33 AM

Posted 24 August 2019 - 05:37 PM

I am utilizing tasker to launch an app when specific buttons are pressed on my remote. Tasker has the ability to launch app activities. For instance the Live Channels app has a lot of activities built into it to go directly to a particular function in the app when launched (see attached photo). Currently Emby only has 1 activity that can be launched (startup.StartupActivity). Can you add more activities for the items below? 

 

On Now - same as the Live TV channel shortcut on the home screen, this would open Emby directly into the On Now screen

 

Live TV Guide - same as the Live TV channel shortcut on the home screen, this would open Emby directly into the Guide screen

 

Recordings - same as the Live TV channel shortcut on the home screen, this would open Emby directly into the Recordings screen

 

 

 

Attached Files



#2 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 46390 posts
  • Local time: 08:33 AM

Posted 25 August 2019 - 10:50 AM

Possible for the future.

 

Thanks.



#3 IkeTaylor11 OFFLINE  

IkeTaylor11

    Advanced Member

  • Members
  • 384 posts
  • Local time: 07:33 AM

Posted 25 August 2019 - 11:57 AM

Possible for the future.

Thanks.


I did a little more digging and I could do the same thing with intents. From what I understand, the programs on the home screen channel use intents to call particular functions of the app.

Could you publish the intents used for the programs used in the Live TV channel? Then I can use those to launch the functions directly and no other coding needs to happen.


Sent from my iPhone using Tapatalk

#4 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 46390 posts
  • Local time: 08:33 AM

Posted 25 August 2019 - 01:06 PM

I believe this is what you'll need:

                <data
                    android:scheme="embyatv"
                    android:host="tv.emby.embyatv"
                    android:path="/direct/[numeric code - see below]" />

Where the numeric code is one of:

    public static final int LIVE_TV_GUIDE_OPTION_ID = 1000;
    public static final int LIVE_TV_RECORDINGS_OPTION_ID = 2000;
    public static final int LIVE_TV_SCHEDULE_OPTION_ID = 4000;
    public static final int LIVE_TV_SERIES_OPTION_ID = 5000;
    public static final int LIVE_TV_ONNOW_OPTION_ID = 6000;

So, for instance, for the guide the path would be "/direct/1000"



#5 IkeTaylor11 OFFLINE  

IkeTaylor11

    Advanced Member

  • Members
  • 384 posts
  • Local time: 07:33 AM

Posted 25 August 2019 - 02:24 PM

@ebr, thank you for the info. Would you be able to help with building the send intent? I am struggling on what goes where inside the intent builder. The options are listed below.

 

Action:

Cat:

Mime Type:

Data:

Extra:

Extra:

Extra:

Package:

Class:

Target: (drop down menu with these options: Broadcast Reciever, Activity, Service)



#6 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 46390 posts
  • Local time: 08:33 AM

Posted 25 August 2019 - 03:22 PM

Package = tv.emby.embyatv

Action (I think) = view

Data (I think will be the path I specified above) = /direct/1000

Target = Activity



#7 IkeTaylor11 OFFLINE  

IkeTaylor11

    Advanced Member

  • Members
  • 384 posts
  • Local time: 07:33 AM

Posted 25 August 2019 - 04:44 PM

Package = tv.emby.embyatv
Action (I think) = view
Data (I think will be the path I specified above) = /direct/1000
Target = Activity


I tried that and a bunch of other variations. Can’t seem to get it to do anything. Seems I’m not smart enough to make this actually work. Maybe somebody else will chime in with some insight.


Sent from my iPhone using Tapatalk




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users