raspberry-vanilla / android_local_manifest

106 stars 48 forks source link

External files directory is not available #11

Closed vblemberg closed 1 year ago

vblemberg commented 1 year ago

Hi, I'm running the aosp 13 on raspberry pi 4 and having issues with external files. context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS) - returns null context.getExternalCacheDir() - returns null context.getExternalMediaDirs() - returns null

When checking Environment: Environment.getExternalStorageState() - returns "unmountable" Environment.getExternalStorageDirectory() - returns "/storage/emulated/10" Environment.isExternalStorageEmulated() - returns true Environment.isExternalStorageRemovable() - returns false

I've also tried adding connecting usb flash drive to raspberry hoping it will help but it didn't. context.getFilesDir() - works fine

Does someone have any idea what can be the issue?

KonstaT commented 1 year ago

Closing as this is probably not the place to discuss general Android APIs. There's is nothing in the Raspberry Pi hardware specific implementation that would make this any different from any other Android device running Android 13.

I'm not an Android application developer but storage APIs are one thing that seem to change between almost every Android version.

Some links to Android API documentation that might be useful to you. https://developer.android.com/reference/android/content/Context#getExternalFilesDir(java.lang.String) https://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()