Updating the application without installing a new APK

I am trying to see if it is possible to remotely update the application on users' phones without downloading the .apk file . (This is a request to collect information from my โ€œboss.โ€ He thinks this is possible on iOS, so he wants me to check Android).

Essentially, I try to have my application sometimes pull out the version number from our web server to check if it needs to be updated if the application then requests permission and then uploads new files (updating the source code, .xml layout files, images and etc.) and, thus, bypassing the need to download the APK (50 MB in size) from the Play Store in general for corrections or even small feature updates.

From what I found:

  • I could upload resource / data text files that could be read for more content, but can't really change the source code because ...

  • The APK file is essentially โ€œbakedโ€ when its generated source code, .xml files, etc. minimized, renamed and confused, adding new features or fixes to an existing APK would be difficult. I think you can change images, but more on that.

I believe that Candycrush does this somehow when it loads new levels (updating in an application that is not connected to the play store), but it may just be method 1. A brief study of the Firebase config remote control also has something similar, but limiting the parameters of the preliminary settings means that trying to use it to fix / update can be spotty.

Am I right, or am I missing something obvious?

+5
source share
2 answers

I think your problem can be solved with patching .

Some library may help you:

  • Tinker

    Tinker is a bug fix solution library for Android, it supports updating files, libraries and resources without reinstalling apk.

  • Andfix

    AndFix is โ€‹โ€‹a solution to fix network errors instead of redistributing the Android Application. It is distributed as an Android library.

    Andfix is โ€‹โ€‹an abbreviation for "Android hot-fix".

    AndFix supports Android versions from 2.3 to 7.0, both ARM and X86 architecture, both Dalvik and ART, both 32-bit and 64-bit.

    The compressed patch file format is AndFix -.apatch. it is sent from your server to the client to fix your application errors.

    Principle
    The principle of AndFix implementation is the replacement of the method body,

    enter image description here ...

  • Amigo

    Amigo is a fix library that can fix almost all of your Android app.

+5
source

Unable to update source code without updating apk. Firebase Remote Config can help you update the values โ€‹โ€‹of some parameters without updating the application. You can also define your own way of downloading additional files from your own server, but the source code inside the application cannot be changed.

0
source

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


All Articles