Skip to content
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

Implement VIEW intent handling #160

Open
vivithecanine opened this issue Aug 4, 2023 · 1 comment
Open

Implement VIEW intent handling #160

vivithecanine opened this issue Aug 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@vivithecanine
Copy link

Please describe the feature.
It would be helpful to be able to tune to specific streams or videos via ADB. Similar to issue #159.

For example, STube can handle urls like this:

adb shell am start -a android.intent.action.VIEW -n com.teamsmart.videomanager.tv/com.liskovsoft.smartyoutubetv2.tv.ui.main.SplashActivity -d "https://youtube.com/watch?v=dQw4w9WgXcQ"

This would require an intent-filter like the following:

<action android:name="android.intent.action.VIEW"/>

As well as some kind of Intent Processor

@fgl27
Copy link
Owner

fgl27 commented Aug 5, 2023

The app has a method to deal with intent, technically any that arrives included if those you propose are added must pass by this, but I have tested it.

@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}

Then we can retrieve the intent, save or do something with it.

and then we can send it to the front end as done here.

mWebView.loadUrl("javascript:smartTwitchTV.Main_onNewIntent(Android.GetIntentObj())");

Technically is better to add a method that checks the URL in the front end as the URL may change and changing the front end of this app is much easier, as doesn't require pushing a play store update.

Thanks for sharing the proper explanation of how to test this it helps a lot, will add this in the future.

@fgl27 fgl27 added the enhancement New feature or request label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants