Update one APK from two projects

124 views Asked by At

I'm developing an Android application using WLanguage (WinDev Mobile). Now, I would like to re-develop the application with another language/technology : React Native. I store my APK on a private server. To update the application the user open on his device the existing application, download the new APK, and the update start.

My question is : what do i have to do to be sure my APK created with React Native will be detected as an update from the one created with WinDev Mobile ?

I want the end-user to update the existing application and not install a new one.

Thanks

1

There are 1 answers

1
Robert On BEST ANSWER

There are three mandatory requirements and one optional:

  1. An app update have to use the same package name in AndroidManifest.xml
  2. The app has to be signed using the same kryptographic key + certificate (usually you have this key in forma of a keystore file like .ks, .jks or .bks + password)
  3. The versionCode has to be higher than the ´versionCode` number in your last WLanguage based release, otherwise Android can reject the update because it considers it a downgrade

And optional:

The class name of the main activity should stay the same. Otherwise all users who have created a shortcut on their launcher will loose the shortcut.

To get it see AndroidManifest.xml of your last WLanguage based release

<activity android:name="<classname>" ... />
    <category android:name="android.intent.category.LAUNCHER"/>` 
    ...