Emulator questions

Do I need to restart the emulator every time I do the editing of the application I'm working on? I also created a database in one of my applications and every time I open this application in one emulator. Every time I open the application, it creates a new database on the emulator or when I close it and open it again, is it a database still there with all the values โ€‹โ€‹saved?

+7
source share
4 answers

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

It will reuse the already created database if you do not remove the application from the emulator or clear the application data.

+9
source

Since Eclipse installs the application for you, when you click the "Play" button, I usually use the "adb uninstall my.app.name" command to uninstall the application because it is faster than browsing the data folder and deleting the database.

You do not need to restart the emulator every time you change the code, just keep it open. In fact, even if you use Eclipse, you do not need to run the emulator from the IDE, you can run it separately, and Eclipse will find the emulator running. This is very useful when you need to run your own kernel or custom memory partition.

+3
source

emulator for all intense purposes like your phone.

So, stopping and starting the emulator is like turning the phone off / on. The data in the database should remain constant.

In addition, you should not restart the emulator. Way too slow .. By "Launching" the application every time you make a change, Eclipse will tell you to send a new APK file to the emulator. You can see the assembly and deployment in the console that occurs when the application starts. The emulator session continues to work, but the new APK file is deployed and launched.

If you encounter unusual startup problems, try also the โ€œCleanโ€ project.

+3
source

It is not necessary to restart the emulator every time. It will use an existing database if you do not install the application.

+1
source

All Articles