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
When storage path is specified, queries come back empty. #8
Comments
Sorry for the late response, I didn't have much free time the last few
days.
So specifying the storage path make room unable to read the database. This
seems a bug. I will investigate and ask you for more information if needed.
…On Thu, Feb 22, 2018, 2:28 PM bearandwolf ***@***.***> wrote:
Repro steps:
+) cloned your repo, builded successfully and verified the employers and
customers are queried
+) added a storage path (apps data directory) to the instantiation :
/storage/emulated/0/Android/data/com.huma.roomforasset/files/db/ (both in
java and kt)
+) added READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permission
+) after uninstall and reinstall i can see the db in the expected folder.
employees and customers table are not empty as expected
+) clicking on the buttons "employees" and "customers" now results in
empty tables.
Any ideas whats going on, did i miss sth.? Anyway thanks for your lib and
you effort.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIbcJhUypnJMQ8DmNJZai_z-RKzRsLkWks5tXV2KgaJpZM4SPOku>
.
|
I'm closing this issue since no more info is added feel free to open it if you still face the same problem. |
@humazed : Unfortunately i still have that or a similar problem. I try to point room to a database in /storage/emulated/0/Android/data/... , but it then uses one in /data/user/0/.... . I have recently returned to the project i am trying to use RoomAsset in and specifying a path does not work. seems to me that initializing roomasset with a path like:
results in the following path: |
@humazed : I tested my abovementioned sample modification again by changing the onCreate method in the JavaActivity in order to provide a path the following way:
And what I am seeing is unfortunately exactly what I saw in my project:
The database ends up in data/user instead of the specified path /storage/emulated/0/Android/data/ . So specifying a path does not work. I would reopen this issue but it seems I don't have the required permission. Can you please confirm this issue and ideally fix it? |
Repro steps:
+) cloned your repo, builded successfully and verified the employers and customers are queried
+) added a storage path (apps data directory) to the instantiation : /storage/emulated/0/Android/data/com.huma.roomforasset/files/db/ (both in java and kt)
+) added READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permission
+) after uninstall and reinstall i can see the db in the expected folder. employees and customers table are not empty as expected
+) clicking on the buttons "employees" and "customers" now results in empty tables.
Any ideas whats going on, did i miss sth.? Anyway thanks for your lib and your effort.
The text was updated successfully, but these errors were encountered: