Turn off on shutdown in phonegap application on Android

I wrote an application using Phonegap on Android and ran it directly from Eclipse on my mobile device (Android). exit to suspend config was true .

Now I want to update the application, and I can’t do this, because every time I launch the application from Eclipse (to run on my device), I get the old version, since every time I exit the application that it receives paused and then resumed at startup again.

Updating is crucial, because there is some kind of database information that I need, and I can’t use the code that I wrote to get the necessary information, because the application does not update on the mobile device (it constantly renews).

What can be done to force an application update without losing the database (SQLite)? I changed config.xml and turned off exit-on-suspend, but did nothing, as Cordoba always detects a previous (paused) version.

I tried to kill the running applications by restarting both the mobile phone and eclipse and adb, but this did not work.

Is it possible to uninstall the application and install it again without losing the database? If not, how do I update the application?

Thanks.

EDIT: Typos.

+4
source share
2 answers

I think the new meaning (to Cordoba 3.3) could be:

<preference name="KeepRunning" value="true"/> .

-1
source

It happens really, really late, but it can help others ...

Just clean up the project before launching the application by following these steps:

  • Go to the project menu

  • Then click "Clear"

  • Select the current project you are working on and click Ok

This will clear your project but not delete it, and your new updates will be implemented.

Hope this helps, welcome !!!

-1
source

Source: https://habr.com/ru/post/1485776/


All Articles