Android App - File access fails on ChromeOS

0

My Android file browser fails to run on ChromeOS so I made a small test application to access files on my Chromebook. This fails, too:

The program checks the start location exists (in this case "/"):

File currentFolder;
String pathname = "/";
currentFolder = new File(pathname);
if(currentFolder.exists()) {

And then goes on to find out what is in there:

        // continues
        File[] directories = currentFolder.listFiles();
        int size = directories.length;
        // display code etc.
}

Problem: currentFolder.listFiles() closes the program on ChromeOS (see edit below - the array is empty).

Unfortunately, I cannot get debug logging on my Chrome tablet via USB or Wireless by following the instructions (my Asus tablet does not seem capable) and the Android Studio emulator fails to run on my machine:

Emulator: virto-goldfish-pipe fatal error: init:475: Could not get virtio gpu ops!
Emulator: Process finished with exit code -1073740791 (0xC0000409)

So I can't even debug things to find out what is going wrong. The application just vanishes with no information. I'd love to have a proper debugger running...

I'm using Android permissions in my Manifest (that work fine on my Android device):

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Are there any other permissions I need to request from ChromeOS? My browser needs to access the MicroSD on Chromebooks where I have files stored in a fixed location. Is there something different I need to do to access the storage directly? I'm worried it might be protected from Android apps...

android
google-chrome-os
androidappsonchromeos
asked on Stack Overflow Aug 9, 2020 by David • edited Aug 9, 2020 by David

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0