search

Home  >  Q&A  >  body text

android - 怎么在线升级app

完成了一个react-native项目,只做了android版,在考虑怎么做后续升级,因为APP体积就几兆,打算做全量升级。具体应该怎么做,没有概念,请老手给个比较详细的思路,谢谢!

迷茫迷茫2771 days ago691

reply all(5)I'll reply

  • 阿神

    阿神2017-04-18 09:19:47

    The usual approach is that when the App starts, it will check whether there is a new version. If it exists, the user will be prompted to upgrade. The additional method is to display the version number in the settings and click to check for new versions.

    reply
    0
  • 黄舟

    黄舟2017-04-18 09:19:47

    Can you be more specific? I have now generated an index.android.jsbundle file and placed it on the external server. What should I do next to allow the client to automatically update?

    reply
    0
  • PHPz

    PHPz2017-04-18 09:19:47

    If you don’t want to re-download the app, use code-push
    To re-download the app, you need to change the versionCode and versionName, which just need to be larger than the last time.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:19:47

    There is an upgrade function on bugly

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 09:19:47

    The questioner should not be talking about hot update here. The mechanism of non-hot update online upgrade is actually very simple. When opening the app, make a network request and bring the version_code. The background will tell you whether the current version is the latest version. If so, Enter the app directly. If there is a new version, you can get the download address of the new version according to the network return result and download it.
    Although react-natvie is developed with js, it is ultimately packaged and released as apk, so the online update mechanism can also be used

    reply
    0
  • Cancelreply