Android Question ANDROID TV USB FILE READ & SHOW

aldus69

Member
Dear All,
I am totally new to b4a
I'm trying to make an application for android tv, which in the end can work as a screen saver through a simple slide show.

Initially, take the example as a starting point:
B4A Class External Storage - Access SD cards and USB sticks
Which, I was able to compile and install and get working on my android phone.
But when I try to install the apk on my android tv, it boots up, shows the home screen and there it is.

Then try to compile the example of usbdetails.1.1.zip and it worked fine in my android tv, first the program asks for permission to access the usb and then shows the info of the connected pendrive.

According to what you comment, I believe that it is an access permission problem, to make the ExternalStorage library work.

I beg your help

Cheers
nestor
 

agraham

Expert
Licensed User
Longtime User
It doesn't look like a permission problem to me as external storage doesn't need any extra permissions over the ones it already asks for. Also, it doesn't matter for External Storage whether there is a pendrive plugged in or not as it works on the internal memory as well as external drives. Even if there is no external drive attached it should still ask for a root folder to be selected like it did on your phone. If it did not then there is something different about your Android TV that is preventing it working.
 
Upvote 0

aldus69

Member
Remember that

usbdetails.1.1.zip worked fine in my android tv, first the program asks for permission to access the usb and then shows the info of the connected pendrive.
 

Attachments

  • USBdetails1.1.zip
    8.6 KB · Views: 89
Upvote 0

aldus69

Member
Looks like a limitation of Android TV. I've found on the web that External Storage (Storage Access Framework) is not supported on Android TV
Remember that

usbdetails.1.1.zip worked fine in my android tv, first the program asks for permission to access the usb and then shows the info of the connected pendrive.
 
Upvote 0

aldus69

Member
That's totally irrelevant to Storage Access Framework. You can use USB at a low level but Storage Access Framework is not present on Android TV.
Thank you Agraham for your answer,
I would like to say, from your answer, that with V4A it would not be possible to make an apk that can read the files from a flash drive on an Android TV.
I would like to ask you, if you can guide me, and since there are apks that can read a flash drive on an Android TV, if I should use another application development platform, to achieve my goal, and if you could tell me which platform could it be that?
Thank you very much for your kind answer
nestor
 
Upvote 0
Top