Skip to content

How to load data from a database in Assets folder #71

@JAntoniodomga

Description

@JAntoniodomga

ReActiveAndroid Version: 1.4.3

Bug or Feature Request: How to load data preloaded in a db file in Assets folder

Description:
I create a db file with data and when y try to get data i can´t load.
Thanks

Activity

bhapps

bhapps commented on Mar 7, 2020

@bhapps

try this;

#44 (comment)

persiscms

persiscms commented on Jun 14, 2021

@persiscms

create a sqlite database and name it exactly as you defined in AppClass with .db extension. when reactiveandroid initialized it will copy database from asset folder into data directory which is working with. but be aware for any further modification of database file. in that case you should create migration

nguyenconghoan

nguyenconghoan commented on May 31, 2022

@nguyenconghoan

ReActiveAndroid doesn't support work with a database from assets folder. To do it, you must copy your db file to databases folder manually before ReActiveAndroid have been initialized.

Reference link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nguyenconghoan@persiscms@bhapps@JAntoniodomga

        Issue actions

          How to load data from a database in Assets folder · Issue #71 · ImangazalievM/ReActiveAndroid