fgl27 / SmartTwitchTV

A Twitch web client that works on Android TVs and web base systems
GNU General Public License v3.0
345 stars 28 forks source link

Handle URLs #159

Open Shagon94 opened 1 year ago

Shagon94 commented 1 year ago

Is your feature request related to a problem? Please describe.

IT would be nice if the app had supported URLs - that in turn would allow for a nice home-assistant integration - allowing the app to be turned via another app.

Describe the solution you'd like

Something like:

        <!-- Accepts URIs that begin with "smarttwitchtv://open” -->
        <data android:scheme="smarttwitchtv"
              android:host="open" />

Describe alternatives you've considered

None

Additional context

In home-assistant you can open apps, so for example to turn on plex or youtube:

     - show_name: true
        show_icon: true
        type: button
        icon: mdi:youtube
        tap_action:
          action: call-service
          service: remote.turn_on
          data:
            activity: vnd.youtube://
          target:
            entity_id: remote.atvremote
        hold_action:
          action: none
      - show_name: true
        show_icon: true
        type: button
        icon: mdi:plex
        tap_action:
          action: call-service
          service: remote.turn_on
          data:
            activity: plex://
          target:
            entity_id: remote.atvremote
        hold_action:
          action: none

I basically reference plex:// to open plex and vnd.youtube:// to open youtube. Having this would allow for even more features - such as allowing SmartTV Client for Twitch to open the URL from the launcher directory to the activity.

fgl27 commented 1 year ago

I'll take a look and add on future update.