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

Can't import newpipe subscriptions in Android TV #8195

Closed
5 tasks done
theobs3rver opened this issue Apr 14, 2022 · 14 comments
Closed
5 tasks done

Can't import newpipe subscriptions in Android TV #8195

theobs3rver opened this issue Apr 14, 2022 · 14 comments
Labels
Android TV Issue is related to Android TV question Not really an issue, but more of a question about how something works

Comments

@theobs3rver
Copy link

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.22.1

Steps to reproduce the bug

  1. Go to Subscriptions.
  2. Click on the Previous export option.

Expected behavior

File manager should open up to select the file to be imported.

Actual behavior

A notification is seen: "This feature is not supported on this device"

Screenshots/Screen recordings

No response

Logs

No response

Affected Android/Custom ROM version

Android 9

Affected device model

Sanyo XT-43A082U

Additional information

The affected device is an Android TV

@theobs3rver theobs3rver added the bug Issue is related to a bug label Apr 14, 2022
@litetex litetex added the Android TV Issue is related to Android TV label Apr 16, 2022
@peat80
Copy link

peat80 commented Apr 17, 2022

Sounds device specific. Works just fine on ShieldTV. Probably your tvs firmware has no filepicker included.

You could try if it helps to disable saf in newpipes download options.

@opusforlife2 opusforlife2 added question Not really an issue, but more of a question about how something works waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. and removed bug Issue is related to a bug labels Apr 19, 2022
@moneytoo
Copy link
Contributor

Basically no Android TV device (except for only Nvidia Shield devices) have the SAF file chooser. The official Android TV emulator also doesn't have SAF file chooser. https://issuetracker.google.com/issues/202985150

@peat80
Copy link

peat80 commented Apr 25, 2022

Did not know this. 🤔 So maybe newpipe should force its internal file manager for android tv devices? 🤔 Worked well on shield tv too last time i used it. 🤔
This is not possible anymore because SAF is forced on android 9 and above.

@peat80
Copy link

peat80 commented Apr 28, 2022

I just got a new bravia tv and there you can set your installed file manager to browse for the export files which works also fine. 🤔 So there is no filepicker installed on this rom but you can install one.

@opusforlife2
Copy link
Collaborator

Basically no Android TV device (except for only Nvidia Shield devices) have the SAF file chooser.

@Stypox so should NNFP be enforced for TVs?

@theobs3rver
Copy link
Author

You could try if it helps to disable saf in newpipes download options.

It worked. Thanks.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label May 1, 2022
@Stypox
Copy link
Member

Stypox commented May 1, 2022

so should NNFP be enforced for TVs?

Uhm, I don't know. From API 29 NNFP does not even work anymore. On Fire TVs NNFP is already enabled by default, see the setting migration. It would not be too difficult to create another migration that switches to NNFP on Android TVs, but I don't know if it is a good idea.

@opusforlife2
Copy link
Collaborator

@moneytoo How do Android 10+ TVs handle file management if not through SAF?

@moneytoo
Copy link
Contributor

moneytoo commented May 2, 2022

@opusforlife2 Android TV apps are supposed to used MediaStore API (but it's limited to mostly media files of known mime types to the system). File managers can use the legacy file API with the MANAGE_EXTERNAL_STORAGE permission to access all files on all volumes. The last option is to use the legacy file API but it's limited to media files on the internal storage only. Accessing some binary (application/octet-stream) files is limited to the application scope only (the Android/data/... folder).

On Android TV & SAF:
https://commonsware.com/blog/2017/12/27/storage-access-framework-missing-action.html
https://commonsware.com/blog/2019/12/08/more-missing-saf.html

Some device manufacturers (e.g., Xiaomi) exported activities matching the SAF Intent structure but without actually allowing the user to perform SAF actions. This passes the CTS, because the CTS skips these tests on TV devices. And so we try starting the SAF activities on these broken devices and get poor results.

@opusforlife2
Copy link
Collaborator

So... if I'm understanding this right... Google just broke file browsing in newer versions of Android TV?

@moneytoo
Copy link
Contributor

moneytoo commented May 2, 2022

@opusforlife2 Exactly. Because of this, apps like game emulators need MANAGE_EXTERNAL_STORAGE permission, just to read .nes files for example. The irony is that large number of media players also request this permission, just to read formats like wmv or less used subtitle formats (which kind of defeats the purpose of this all).
As NewPipe is not on the Play Store, it could use this permission for the import/export.

@opusforlife2
Copy link
Collaborator

@Stypox ^ What say?

@Stypox
Copy link
Member

Stypox commented May 2, 2022

I think this would require us to add yet another way to access storage which might not be simple. If some developer wants to do that, he can go ahead. Check out #5415 for some information.

@opusforlife2
Copy link
Collaborator

@moneytoo Could I implore you to open a new issue explaining what we need? (I can then slap the Android TV label on it for future contributors to stumble upon it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android TV Issue is related to Android TV question Not really an issue, but more of a question about how something works
Projects
None yet
Development

No branches or pull requests

6 participants