CaptureScreentshot() to get an image. But when I try to access it on an Android device it's giving me:
Could not find file "/storage/emulated/0/Android/data/appname/screenshot.png"
When I go the external storage, it's not there, but rather on the phone storage. So why is persistentdatapath accessing something different?
My code is the following:
byte Bytes_File = System.IO.File.ReadAllBytes(currentScreenshotPathname); with thepathname obtained using:
currentScreenshotPathname = System.IO.Path.Combine(Application.persistentDataPath, currentScreenshotName);
Is there anyway to make the persistenDataPath go to the phone storage rather than emulated to read the file? I've tried changing the
WriteAccess perimission to
Externalas well as
Internal in the player settings, but it's still the same.
Edit: Here's what's happening: PersistentDataPath is /storage/emulated/0/Android/data/myapp/files/, but the screenshot is being saved to /mnt/sdcard/Android/data/myapp/files, despite the documentation saying that it should save to the PersistentDataPath.