Saving and Accessing Files on Magic Leap

Hi,

I am trying to capture a frame from magic leap and save it as JPG on the device. I am saving it in the following manner:

    yield return new WaitForSeconds(2f);

    debugText.SetText("Capturing a Frame");

    // Capture a frame
    Task<Texture2D> task = imageAcquirer.GetImage();
    yield return new WaitUntil(() => task.IsCompleted);

    Texture2D frame = task.Result;
    if (frame != null)
    {
        debugText.SetText("Saving as JPG");

        byte[] bytes = frame.EncodeToJPG();
        string filePath = Application.persistentDataPath + "/ML2currentFrame.jpg";
        File.WriteAllBytes(filePath, bytes);

        debugText.SetText("Saved JPG to " + filePath);

The path it is stored into is : /storage/emulated/0/Android/data/com.base64_NoJson.base64_NoJson/files/ML2currentFrame.jpg .. however I cannot find any files in that location.

I believe the file is saved in that location as I was able to access the JPG from the same path and visualize the texture on a raw image.

Can you point me towards how I can access the files being stored locally on the device? Thanks.

I think this is because you are looking in the wrong directory try /sdcard/Android/data/com.base64_NoJson.base64_NoJson/files/... instead.