Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emulator questions

Do I need to restart the emulator everytime I make an edit to the app I'm working on? Also I have created a databse in one of my apps and open this app in the same emulator each time. Each time I open the app does it create a new database on the emulator or when I close it and re open it is the database still there with all the stored values?

like image 685
Somk Avatar asked Feb 16 '11 13:02

Somk


2 Answers

You will not need to restart the emulator each time, you can just push the new version of the APK to the device manually, or Eclipse will handle this automatically.

It will reuse the already created database unless you uninstall the application from the emulator or clear the application's data.

like image 112
Will Tate Avatar answered Nov 08 '22 21:11

Will Tate


As Eclipse installs the application for you when you hit the "Play" Button, I usually use the command "adb uninstall my.app.name" to remove the application as it is faster than browse to the data folder and erase the database.

You don't need to restart the emulator every time you modify your code, just keep it open. In fact, even if you are using Eclipse, you don't need to start the emulator from inside the IDE, you can run it separately and Eclipse will find the running emulator. This is very useful when you need to run a custom kernel or a custom memory partition.

like image 33
Rodrigo Chiossi Avatar answered Nov 08 '22 21:11

Rodrigo Chiossi