Rithesh M
Rithesh M

Reputation: 1287

db file not found in file explorer(DDMS)

Hello everyone i am using db in my app i have stored that db in assets folder here is the sample where i have set my db path.Its not generating any folder of db in the package. Can anyone help me out here..

public class Paths 
            {
                private static final String FILEPATH = Environment.getExternalStorageDirectory() + "/Nali Kali/";
                private static final String DBPATH = "data/data/com.android.akshara/databases/";
                private static final String DBNAME = "akshara.db";

                public Paths()
                {

                }
                public static String getFilePath()
                {

                    return FILEPATH;
                }
                public static String getDbPath()
                {
                    return DBPATH;
                }

                public static String getDbName()
                {
                    return DBNAME;
                }
        }


    Thank you in advance.:-)

Upvotes: 1

Views: 1714

Answers (1)

Yaqub Ahmad
Yaqub Ahmad

Reputation: 27659

The complete example of how to do it? is here.

1- Keep the Database in assets folder.

2- Copy the database from assests to data folder.

3- Write a DataAdapter class for common functions like insert/update/delete.

Upvotes: 1

Related Questions