简体   繁体   中英

Using a pre-built db4o database in android app

Im REALLY struggling to get a pre baked db4o database to work inside my android app. If i include it in the /res/raw folder then read it, it doesn't work. If i copy it to the app_data or sdcard then try and read it, it will act as if im opening a new database and provide me with 0 entries on queries. I was previously just creating all my entries when the app was first opened but as the db grew, so did the creation time to unsustainable levels. I would really, really appreciated any help you can give me. It would be perfect if i can include my pre-populated db4o file in the app. Additional Info: I have double checked the db4o file with ome and theres no issue with the db creation on my local machine.

Thanks in advance.

If any one falls into the same trap as me here's the answer:

On android the class is injected into the db4o db with the package name prefixed to the class name by defualt. So accessing from another application will look be looking for +.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM