Android update app programmatically

后端 未结 2 1760
盖世英雄少女心
盖世英雄少女心 2020-12-10 06:28

I have an app, but I want to update it, I read some post of \"stackoverflow\" (update application programmatically)

Android programmatically update ap

相关标签:
2条回答
  • 2020-12-10 06:45

    please visit this link you may get some idea LINK

    It follows these steps ::

    1 Create a Web Service which your app can poll whenever the app launches or based on some time limit that can check if there is new version out there.

    1. This Web service should return the lastest Version of the apk file that is hosted on the Server along with the URI of the application file that has the new version.

    2. When your app gets the response from the Web Service, it will parse the JSON and check your app version to the lastest version that is available on the server.

    3. If your app version is lower than the latest version it will prompt the user to start the download process. The download of the new app is handled by the Download Manager.

    4. The download manager will notify your app using Broadcast receiver when the download is complete.

    5. After completion of the latest version of the application file the you can start the activity to install/update that file.

    0 讨论(0)
  • 2020-12-10 07:05

    Try this option

    Add google library to update from the application

      dependencies {
    implementation 'com.google.android.play:core:1.5.0'
    ...}
    

    refer doc from below link

    https://developer.android.com/guide/app-bundle/in-app-updates#update_readiness

    0 讨论(0)
提交回复
热议问题