mediathekview / zapp

German public broadcasting live streams as an Android app
https://mediathekview.de/news/zapp/
MIT License
197 stars 33 forks source link

Improve Mediathek sharing feature #108

Open ChrisPHL opened 6 years ago

ChrisPHL commented 6 years ago

Hi there,

the feature "Play with Kodi" is known from NewPipe (YouTube App: https://github.com/TeamNewPipe/NewPipe). I would much appreciate to have that feature from the "Mediathek" tab since the typically Mediatheken Kodi Add-On's search functions do not work well with the TV's remote control. Would you consider to add that feature?

Kind regards Christian

cemrich commented 6 years ago

This is a cool feature that I will include in the future. Since then you can long press on a mediathek item and select "Teilen" - the Kodi app will pop up if it is installed. The cast icon however is a much nicer user interface :-)

cemrich commented 6 years ago

I did some research and there is a ShareActionProvider which will work nicely for many users. It displays the last view apps used for sharing inside the toolbar. This way Kodi will show up for Kodi-Power-Users and other apps for other users - depending on their use cases.

screenshot_2012-02-08-14-01-21

rugk commented 6 years ago

When this thing replaces the usual Android share menu, I don't really like that. It may look nice first, but then you miss this new Android feature, where it displays the contacts to share to directly at the start of the share page.

cemrich commented 5 years ago

There seem to be some changes with Android Q: https://developer.android.com/preview/features/sharing I'll wait for them to settle.

Bond246 commented 4 years ago

I really would like to add something to this topic.

Actualy every mediathek item has a sharing button in the top right corner. With this icon it's possible to share the video-link with every service that android supports... But sometimes (zdf for example) this top right sharing icon has not the highest quality. So you have to use one of the quality items in the bottom list. The sharing button of this individual qualitys has not the whole sharing app library.

So to share the maximum quality with the kodi app i mostly have to go back to the web-version of mediathekview, search for the video and share the video.

It would be nicer if the individual quality sharing buttons have the same sharing library list like the top right corner sharing icon.

cemrich commented 4 years ago

I really would like to add something to this topic.

Actualy every mediathek item has a sharing button in the top right corner. With this icon it's possible to share the video-link with every service that android supports... But sometimes (zdf for example) this top right sharing icon has not the highest quality. So you have to use one of the quality items in the bottom list. The sharing button of this individual qualitys has not the whole sharing app library.

So to share the maximum quality with the kodi app i mostly have to go back to the web-version of mediathekview, search for the video and share the video.

It would be nicer if the individual quality sharing buttons have the same sharing library list like the top right corner sharing icon.

@Bond246 You are right. The top corner button shares the medium quality url (because we can be sure it exists) as text/plain, whereas the quality buttons share as video/*. Technically the quality buttons work correct and they play nice with VLC, Yatse and the google video player. Sharing as plain text shows more apps, but most likely apps you don't want to share with.

Are you using Kore to share to Kodi? For some reason Kore does not react to video/* share intents: https://github.com/xbmc/Kore/blob/master/app/src/main/AndroidManifest.xml

Any thoughts on this implementation?

Bond246 commented 4 years ago

Hello,

you are right, i use kore which was more handy than yatse last time i was testing both of this apps. So you think it might be a good idea to contact the kore devs to ask for video/* implementation?

From my point of view having always the best quality in top right corner sharing button would be the best idea. Or maybe it would be a good idea to make this a user configuration? I mean... i know that not all videos have the highes quality so i understand that you say it is a good idea to have only the smaller medium quality there...

And i think sometimes it would be good to copy just the quality url for sharing it via whatsapp, notes app and so on... So having more apps than only video apps is more useful. Most of the android system sort the sharing menu by recent used apps.

cemrich commented 4 years ago

you are right, i use kore which was more handy than yatse last time i was testing both of this apps. So you think it might be a good idea to contact the kore devs to ask for video/* implementation?

If kore can process video/* urls it should be able to accept this mime type. Maybe there is a good reason for this behavior but it doesn't hurt to ask.

From my point of view having always the best quality in top right corner sharing button would be the best idea.

Yes, I'll do that. Best quality and medium quality for fallback.

Or maybe it would be a good idea to make this a user configuration?

Nope. Most users won't have this problem. For all other users every additional option does make the ui more complicated.

And i think sometimes it would be good to copy just the quality url for sharing it via whatsapp, notes app and so on... So having more apps than only video apps is more useful. In this case you can use the top right button. There should be no need to share a low quality url to anything other than a video player of some kind.

Most of the android system sort the sharing menu by recent used apps.

If this was the case I would not even discuss this issue. Zapp could happily share with all the apps. But on modern Android versions the sharing menu is a ever changing, inconsistent mess. Maybe Android Q will fix some of these issues.

WebworkrNet commented 3 years ago

Wouldn't it be possible to select the quality level beforehand, as is the case under "Download"? Then the handling would be uniform.

It is also currently unclear what the quality is when the share menu is used. A corresponding note is missing.

WebworkrNet commented 3 years ago

Wouldn't it be possible to select the quality level beforehand, as is the case under "Download"? Then the handling would be uniform.

It is also currently unclear what the quality is when the share menu is used. A corresponding note is missing.

20210530_100755

kernal64 commented 2 years ago

I'd like to have the ability to select the quality level beforehand, too.

cemrich commented 2 years ago

There is a share button directly beneath the download button. There you can select the quality you want to share. I try to leave the main actions as easy as possible and want to avoid additional clicks for the main share button in the actionbar.

kernal64 commented 2 years ago

There is a share button directly beneath the download button. There you can select the quality you want to share. I try to leave the main actions as easy as possible and want to avoid additional clicks for the main share button in the actionbar.

I assume, that the main share button in the actionbar is the one in the upper right corner? The share button beneath the download button doesn't offer all relevant apps. To name a few, I'm missing "pyLoad", "FairEmail", "WhatsApp", "Nextcloud" and "Total Commander" in the list of receiving apps over there. They are available, when I use the main share button in the actionbar, but then medium resolution is selected, even if high and low are available.

IMHO, either all the same apps available with the icon in the upper right corner should be available with the share button directly beneath the download button or the quality selection dialog should show when using the the share icon in the upper right corner.

I understand, that you want to avoid additional clicks for the main share button in the actionbar. Maybe a "Share Quality"-option in the settings could be a good balance?

cemrich commented 2 years ago

Ah, sorry, now I remember the problem! So we either have to provide two complete share functions (with quality selection; like "Share Video"/"play external" and "Share Url" or something) or use some kind of setting or toggle, which I would like to avoid.

kernal64 commented 2 years ago

From the user's point of view, it makes no difference whether the video is to be shared for viewing or whether the URL is to be shared. I think two buttons would be confusing any may unnecessarily clutter the ui. Can't a unified share function offer both types off apps and detect what type of receiver the application is (player or downloader) and automatically take the correct branch?

By the way - I like the app very much. It has a clean interface and is very responsive.

Really cool is, when you share with the main share button in the actionbar to pyLoad, the movie name becomes automatically the packet name. When I only could coose the quality level... ;-)

WebworkrNet commented 2 years ago

The share button beneath the download button doesn't offer all relevant apps. To name a few, I'm missing "pyLoad", "FairEmail", "WhatsApp", "Nextcloud" and "Total Commander" in the list of receiving apps over there. They are available, when I use the main share button in the actionbar, but then medium resolution is selected, even if high and low are available.

IMHO, either all the same apps available with the icon in the upper right corner should be available with the share button directly beneath the download button or the quality selection dialog should show when using the the share icon in the upper right corner.

I understand, that you want to avoid additional clicks for the main share button in the actionbar. Maybe a "Share Quality"-option in the settings could be a good balance?

Thanks @kernal64, that is exactly my point.

WebworkrNet commented 2 years ago

From the user's point of view, it makes no difference whether the video is to be shared for viewing or whether the URL is to be shared. I think two buttons would be confusing any may unnecessarily clutter the ui. Can't a unified share function offer both types off apps and detect what type of receiver the application is (player or downloader) and automatically take the correct branch?

I can only agree with this. From the user's point of view, I don't think it makes sense to offer 2 share functions. It would be clear and simple to limit it to one and select the quality level in a second step. That would not overwhelm any user.

cemrich commented 2 years ago

Okay, we have a dilemma here. From a technical point of view we cannot use a single share function without loosing apps.

Whenever I remove any of the share intents, some functionality is lost. There is no way I know of to combine these two Intents.

These are the options I see right now:

  1. Using the toolbar share icon, always share the highest quality available. This is easy to implement and (I assume) expected behavior.
  2. Using the toolbar share icon, show a quality selection dialog. I really, really would like to avoid this option.
  3. Provide two different Intent options that reflect the technical differences, like "Share" and "Play externally". This would be a clean and "correct" solution but most likely confuse a lot of users.
kernal64 commented 2 years ago

I'm actually not an Android-developer, but can't you combine the SEND and the VIEW intent as described on stack overflow :

How to combine ACTION_SEND and ACTION_VIEW intent types?

`// Share val sendIntent = Intent(Intent.ACTION_SEND) sendIntent.setDataAndType(uri, MIME_PDF_TYPE) sendIntent.putExtra(Intent.EXTRA_TEXT, "TEST") sendIntent.putExtra(Intent.EXTRA_STREA, uri)

// Open val openIntent = Intent(Intent.ACTION_VIEW) openIntent.setDataAndType(uri, MIME_PDF_TYPE) openIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)

val chooserIntent = Intent.createChooser(sendIntent,activity.getString(R.string.sharing_title))

chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, arrayOf(openIntent))

activity.startActivity(chooserIntent)`

cemrich commented 2 years ago

Wow, this was new to me. However, it does not work on Android 10 and up: https://stackoverflow.com/questions/59786777/why-intent-extra-initial-intents-not-working-in-android-10

kernal64 commented 2 years ago

Oh, that's too bad that it no longer works on Android 10 and up. I installed Android Studio yesterday and am just getting to know it a bit. I've already cloned the repo and will have a look at it soon. Maybe I come up with another idea. If not, I think your first option is still the best. I would always prefer the highest quality, but I think that should be adjustable in the settings.