-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to create realm database on external file storage on Android 11 and plus #5107
Comments
Hey @umarpazir11, |
Yes, with Android 11 scoped storage is now enforced. This means the only way for apps to share files is through the Storage Access Framework (https://developer.android.com/guide/topics/providers/document-provider). Unfortunately, there isn't a way we can support this from the native side. The only way to use it would be to copy a file from shared storage to internal storage, use it, and then copy it back. But that is probably too restrictive for any real usage. |
@cmelchior So we can close this? |
Yes |
@jedelbo inside of only closing it will be better if they bring some ContentProvidor for realm database similar to android one. |
@cmelchior I will now close this, but I hope you have noted the comment above. |
Expected results
I want to create a realm database on external storage so two apps can use one single database. So I am using scope storage for android to give permission but I can create all other files but not realm database files. only realm.lock file is there
Actual Results
E/REALM: /tmp/realm-java/realm/realm-library/src/main/cpp/realm-core/src/realm/util/file.cpp:1023: [realm-core-11.3.0] Assertion failed: r == 0 && "File::unlock()" with (r, (*__errno())) = [-1, 38]
Steps & Code to Reproduce
Using scope storage for android.
Core version
Android 11 and 12
The text was updated successfully, but these errors were encountered: