In-App Update API showing UPDATE_NOT_AVAILABLE while testing on debugging device

后端 未结 12 893
攒了一身酷
攒了一身酷 2020-12-29 12:22

I am trying to integrate the new In-App Update API but I cannot able to test it\'s implementation. Seems like my code is fine therefore I read the Troubleshoots and am not a

12条回答
  •  囚心锁ツ
    2020-12-29 12:55

    When Internal app sharing dont work

    Internal App Sharing is not working on a real device. I was testing several hours and always got the latest version of Internal Test and not the one of Interal App Sharing that was what I expected.

    The solution is to use an emulator with Play Store.

    I describe the step by step:

    1. Create Virtual Device with Google Play greater than or equal to API Level 21 5.0.
    2. Open the emulator and log in with the google account that is in the list of internal testers.
    3. Build the 2 APKs with different versions. Each one with the same versionCode and versionName temporarily to go checking when performing the installations. For example:

    APK 1: versionCode and versionName: 100
    
    APK 2: versionCode and versionName: 101
    

    1. Upload APK 1 to internalappsharing with versionCode and versionName 100

    2. Copy and paste the shared link of APK 1 into Keep Notes web app.

    3. Install APK 1 with versionCode 100 using the link from the emulator Keep Notes application.
    4. The most important thing: Check that the installed app has versionName 100.
    5. If we open APK 1 at this point, no update will be available until we upload APK 2 with a larger version.
    6. Upload APK 2 with code 101 to internalappsharing
    7. Copy and paste the APK 2 link into Keep Notes web app.
    8. DO NOT install APK 2 from the link. Just enter APK 2 link to check that the Play Store describes the existence of an update.
    9. Open the app installed on the emulator with APK 1 and install the update in-app.

    Finally, each time they enter a link with a version code greater than the last installed from the emulator they will see the existence of a new update, which should be installed within the app and not from the Play Store.


    It is worth mentioning that Logcat is compatible with Internal App Sharing.

    GL

    Source

提交回复
热议问题