-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle URLs #159
Comments
I'll take a look and add on future update. |
I'd like to have this feature as well for a home-assistant integration. I have some experience developing android apps and might be able to develop the android side for this. |
You can send the url to js calling a new method here SmartTwitchTV/app/specific/Main.js Line 193 in 1355187
If you go to the java code you can see examples of smartTwitchTV calls. |
If you wanna to test a js method you can follow this https://github.com/fgl27/SmartTwitchTV?tab=readme-ov-file#inside-the-apk |
Seems like I'm not able to build the app without requiring bigger changes. Seems like https://github.com/GCX-HCI/tray is deprecated and not available from repositories anymore. |
Are you sure? Can see the errors? I build just fine |
This is the error im getting:
If you're using the same machine regularly the library might still be in local gradle cache. You could try Checking https://mvnrepository.com/artifact/net.grandcentrix.tray/tray/0.12.0 also indicates that the dependency is not present in any of the usual repositories. |
I fix that also check this as that is the next error |
@fgl27 I'm able to build and run the app now (after commenting out the Firebase/Crashlytics stuff in PlayerActivity too) and can parse deeplink intents. But tbh I'm a bit lost in how to use the extracted data. It seems like "starting a stream" from the deeplink info for example could happen here https://github.com/fgl27/SmartTwitchTV/blob/master/apk/app/src/main/java/com/fgl27/twitch/PlayerActivity.java#L1520 . But in my understanding the web app more or less always expects some web state to exist when performing actions, so that there's no easy "open this channels page in the web app" command yet. |
The app can receive an intent when it is not running, in that scenario it saves the intent, so when the app opens it can send that intent to the webview... seems odd as the intent opens the app, but when it does the webview or PlayerActivity are not yet running. We already have intents from the home screen SmartTwitchTV/apk/app/src/main/java/com/fgl27/twitch/channels/ChannelsUtils.java Line 280 in 25a592b
To mod this you will need
Here I will add the new type handle to deal with all the URL Make sure once you are done to share with me all possible URLs… Channel, VOD, live, video wherever there is. is a little confusing but the app is not ready to receive a random intent, once this is done I can improve to make things easier to understand and make the handle of multiple intents simpler, but you make something I check and improve. |
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:
Describe alternatives you've considered
None
Additional context
In home-assistant you can open apps, so for example to turn on plex or youtube:
I basically reference
plex://
to open plex andvnd.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.The text was updated successfully, but these errors were encountered: