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
I installed my app from Google Play. Then I removed it and intalled the signed apk with lower versionCode.
"In-app updates are available only to user accounts that own the app. So, make sure the account you’re using has downloaded your app from Google Play at least once before using the account to test in-app updates." developer.android.com/guide/app-bundle/in-app-updates
First, you'd have to publish your app to Google Play. Make sure that:
If you want to have a working demo app, I've uploaded a git repository with a lower version code than the one that I've published in Google Play.
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.
I describe the step by step:
APK 1: versionCode and versionName: 100
APK 2: versionCode and versionName: 101
Upload APK 1 to internalappsharing with versionCode and versionName 100
Copy and paste the shared link of APK 1 into Keep Notes web 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
As Arpit J. suggested basic main requirements to test the app, if still you are not able to successfully test the app, I would like to add one more last step that would help you to quickly test the app.
Go to play store app info from settings as shown in image, and do clear data as show in attached screenshots. The steps to go to play store app info may vary device by device.
I had the similar issue of having UPDATE_NOT_AVAILABLE. After hours of researching, here is how i solved:
use Google play store to install a version of the testing app (I used internal test track rollout)
rollout another version with higher VERSION CODE on Play Console (the same internal test track)
close both testing app and Google play store (not just back to home, use recent key and swipe them off)
open the Google play store and ensure that testing app has an update available (you can check it under "My Apps & Game" > Installed)
now open the testing app and check for UPDATE_AVAILABLE
This works for me almost immediately after rollout
For the first question, they are saying that you need to do a release build of the app, using your release keystore. Then, you could attach the resulting .apk file to an e-mail and e-mail it to yourself. Then, check your e-mail on your android device and download the .apk attachment to your downloads, and at the end of the download, Android should ask if you want to install the .apk, say yes (if it doesn't ask, then click on the file in your downloads folder, and then it should ask).
For the second question, the only way I can imagine testing this through the internal testing tracks since you have to interact with the Google Play storefront, but not affect your live published release.