Android ormlite changes the default location of the database

preface

The ormlite database is placed under databases by default. Sometimes you may need to use the database with preset data, and you may need to change the default path.

text

1. Inherit ormlitesqliteopenhelper:

Code Description:

Note that getwritabledatabase and getreaddatabase are overwritten here, and there is no super.

2. Create database in application

Note: close the database.

end

I searched once and didn't receive any results. After a while, I searched again and found similar results. Thank you for stackoverflow com。

The above is the data sorting for Android ormlite to use and change the default location of the database. I hope it can help students who develop Android applications.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>