Sunday, 15 August 2010

android - GreenDao use existing database instead of creating one -


I am using green color and I came to the point that I am supporting multilingual and I have different Every language I want to use the database

So far, I am building my database using green dao. Now I have to create more than one database within the assets and I will open that which I want and want to manipulate with green dao.

How can I do this?

This is my method of creating a database:

  Public stable daomaster getDaoMaster (reference reference) {if (Dao Master == faucet) {Open Helper Helper = New OpenHelper ( Reference, "DBSLO", blank) {@ Override Public Wide OnUpgrade (SQLiteDatabase DB, Int Olderwoman, It Newversion) {}}; // DevOpenHelper Assistant = New DevOpenHelper (reference, "tronpos-db", tap); Db = helper.getWritableDatabase (); Dao master = new daomaster (db); } Returning daomaster; }  

Instead of creating one now, I want to open an existing (DBSLo which I have in the property) and then want to manipulate the criteria along with it.

Before opening the copy simply in your app class call, as is the method described here: < / P>

In this way, you can already find out or contact the property to create a new one.


No comments:

Post a Comment