Nexus 5x file issues

79 Views Asked by At

Since updating to Android O (8.1.0) on our development Nexus 5x phones, we have been seeing a lot of weird file access issues. We have 1 file that keeps coming up, no reason why this file, but I'm positive the file is in /sdcard/ , I use Java or C++ (NDK) to see if the file exists, but it returns that the file doesn't exist. I can try this 100 times, and maybe 1 time it fails, maybe 10 times it fails. I have this across 5-6 devices, so it's not just 1 device.

Has anyone seen anything like this before? We've deleted the files and have them re-downloaded. This file is for a 3rd party library, we have wondered if there is a file lock, but this file is accessed at startup, so we swipe the app away, restart and right away we can't view the file.

C++ Example:

   return (access(aFileName.c_str(), F_OK) != -1);

Java Example:

File lTempTaskFile = new File(lTaskFileName);
if(lTempTaskFile.exists())
{
    // blah
}
0

There are 0 best solutions below