1

I am making an application using Android Studio. I put the database.db file in the asset folder. What is the correct path to use to open the database?

davidism
  • 121,510
  • 29
  • 395
  • 339

1 Answers1

1

*)run your app on emulator

*)click the "window" button on the title bar

*)select the open perspective on it's list view

*)select the DDMS option[this will return to a new page] On that new window select your emulator (on the left side of your window it will show your currently working emulator's from that select the one that you run the app)

*)Then it will display all the files on your system From that go to "data" file

*)Again in that data file there is another file call on "data" click it then it display your application name's by it's package name select the package that you run early

*)On that file there is a folder call "Databases" if and only if your database was created when you running the application.

*)on that there is a file in your data base name. that is your db file if you run on emulator you can view it, but if you run on phone you haven't permission for view it.

Click for more

ISURU
  • 923
  • 13
  • 24
  • The OP wants to do that programmatically. http://stackoverflow.com/questions/9109438/how-to-use-an-existing-database-with-an-android-application/9109728#9109728 – Phantômaxx Feb 08 '15 at 17:23