I have been unsuccessful in my attempts to implement app store update check with Google Play.
I created a mock project, added
<PackageVersion Include="Xamarin.Google.Android.Play.Core" Version="1.10.3.16" />
To Directory.Packages.props
I added
<PackageReference Include="Xamarin.Google.Android.Play.Core" />
To .csproj
In Google Play Console, I linked a Google Cloud project and enabled Play Integrity API. I created a service account to go along with it.
I published the app on the Closed testing and uploaded subsequent version on internal sharing. I tried uploading both signed and unsigned versions of the app. I then download the app from the Google Play app store and run it to see the logs.
In code, I attempt to check for updates using:
`IAppUpdateManager _updateManager = AppUpdateManagerFactory.Create(Context); var updateListener = new AppUpdateSuccessListener(tsc);
AndroidTask updateTask = _updateManager.AppUpdateInfo;
updateTask.AddOnSuccessListener(updateListener); updateTask.AddOnFailureListener(updateListener);`
I get a response at OnFailure(Exception ex) with:
Install Error(-3): The API is not available on this device.
I tried clearing the Google Play cache but that did not help.
I would appreciate any tips on how to make this work. Thank you.
I tried all the steps I outlined and expected the update check to run successfully without raising an exception.