0

I am a web developer and am new to mobile application development. I am using PhoneGap.

I have successfully created an application however when I make the changes in the html, css & js files and generate new apk file it asks me to re-install the application on my phone. I don't want that to happen; I want the updates or the new changes to be downloaded. How can I achieve this using either eclipse or phonegap?

I went through this link How to make your Android app auto update and now am confused if the application gets updated through Google PlayStore only. And in other cases you need to re-install them.

Thanks for your time.

Thanks,

Utpal

15
  • changes in your html or css or js never ask re-install...this occur may be change your debug key or change in your development environment(means your system) Commented Sep 19, 2014 at 14:39
  • Hi Aravin, once I make the changes I regenerate the apk after running the "cordova build" command in CLI. Let me know if I am doing something wrong. Thanks.. Commented Sep 19, 2014 at 17:51
  • i think regeneration of apk cant ask re-install...are you using eclipse for generate apk build.. Commented Sep 20, 2014 at 4:28
  • yes I am using eclipse to generate the apk. Commented Sep 20, 2014 at 6:08
  • 1
    Thanks Aravin :) So finally made it through this issue.. :D Commented Oct 6, 2014 at 16:08

1 Answer 1

0

Got the solution for the above problem for cordova 3.6. Following are the steps:

1) Open the config.xml in your application folder "your-app-name/config.xml"

2) Find this line

<widget id="com.example.nightinglow" version="0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

3) Change the version="0.0.2" to the desired version

4) Save the file

5) Run cordova build using CLI

Now when download the .apk file and run installation you see this message The application that you are installing will replace another application. All previous user data will be saved. This means that it saves the old data along with new updates.

Note: Tested only on android; not too sure about the iOS and Windows platform.

Hope this helps.

Thanks,

Utpal

Credits to https://stackoverflow.com/users/2541473/aravin for brainstorming it with me.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.