Updating App without installing new APK
Asked Answered
R

2

10

I'm trying see whether it's possible to remotely update an app on a users phones without downloading an .apk file. (It's an information gathering request from my "boss". He thinks it's possible on iOS so he wants me to check on Android).

Essentially, I'm trying to have my app occasionally pull a version number from our web server to see if it needs updating, if so then the app would ask permission, then download the new files (updating source code, .xml layout files, images, etc.) and thereby bypassing the need to download our APK (which is 50mb in size) from the Play Store at all for hotfixes or even small feature updates.

From what I've found:

  1. I could download resource/data text files which could be read for more content, but can't really modify source code because...

  2. the APK file is essentially "baked" when its created so source code, .xml files, etc. are minimized, renamed, and obfuscated meaning adding new features or hotfixes to an existing APK would be difficult. I think you can change images but that's about it.

I believe Candycrush does it somehow when they download new levels (an in-app update that doesn't involve the play store), but that might just be method 1. Brief research of Firebase's remote config also has something similar but the constraint of pre-setting parameters means trying to use it for hotfixing/updating might be spotty.

Am I correct or am I missing something obvious?

Radiance answered 15/11, 2016 at 1:41 Comment(1)
You are right! You can not update apk file without downloading.Irrepressible
C
10

I think your problem could be solved by using patching system.

Some library could help you:

  1. Tinker

    Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstalling apk.

  2. AndFix

    AndFix is a solution to fix the bugs online instead of redistributing Android App. It is distributed as Android Library.

    Andfix is an acronym for "Android hot-fix".

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

    The compressed file format of AndFix's patch is .apatch. It is dispatched from your own server to client to fix your App's bugs

    Principle
    The implementation principle of AndFix is method body's replacing,

    enter image description here ...

  3. Amigo

    Amigo is a hotfix library which can fix almost everything for your Android app.

Crematorium answered 15/11, 2016 at 2:15 Comment(4)
Hmm, these do look hopeful. Of course, I'm worried about possible limitations but that's just more research on my end. Thanks @ישו אוהב אותךRadiance
You're welcome. I hope you can share with us your research as Question and Answer later. Have a good luck ;)Oro
Sadly, it is against Google Play Developers Policy. "An app downloaded from Google Play may not modify, replace or update its own APK binary code using any method other than Google Play’s update mechanism."Dower
Well @DavidLo ? Please share us your research, it's the least you can do after we have helped you....Flea
N
0

It is impossible to update source code without apk updating. Firebase Remote Config can help you to update the values of some parameters without updating app. You can also define your own way to download the additional files from your own server, but the source code inside app cannot be changed.

Noah answered 15/11, 2016 at 1:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.