ExzileGames.AndroidAppUpdateBridge
1.0.24
See the version list below for details.
dotnet add package ExzileGames.AndroidAppUpdateBridge --version 1.0.24
NuGet\Install-Package ExzileGames.AndroidAppUpdateBridge -Version 1.0.24
<PackageReference Include="ExzileGames.AndroidAppUpdateBridge" Version="1.0.24" />
<PackageVersion Include="ExzileGames.AndroidAppUpdateBridge" Version="1.0.24" />
<PackageReference Include="ExzileGames.AndroidAppUpdateBridge" />
paket add ExzileGames.AndroidAppUpdateBridge --version 1.0.24
#r "nuget: ExzileGames.AndroidAppUpdateBridge, 1.0.24"
#:package ExzileGames.AndroidAppUpdateBridge@1.0.24
#addin nuget:?package=ExzileGames.AndroidAppUpdateBridge&version=1.0.24
#tool nuget:?package=ExzileGames.AndroidAppUpdateBridge&version=1.0.24
ExzileGames.AndroidAppUpdateBridge
Java bridge for the Google Play In-App Updates API on .NET Android. Supports both immediate and flexible update flows with clean async C# wrappers.
Problem
The Xamarin binding for com.google.android.play:app-update suffers from a GC issue: InstallStateUpdatedListener instances created in C# can be collected by the Mono GC mid-update because nothing on the managed heap holds a strong reference once the call site returns. This causes silent failures during flexible update downloads.
Solution
A compiled Java class (AppUpdateBridge) holds a strong reference to the InstallStateUpdatedListener as a Java field, keeping it alive for the entire download lifecycle. C# communicates with it via auto-generated JNI bindings — no reflection needed.
Setup
1. Add project reference
<ProjectReference Include="..\AndroidAppUpdateBridge\AndroidAppUpdateBridge.csproj" />
2. Initialize in your Activity
using AndroidAppUpdateBridge.Interop;
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);
AppUpdateBridgeManager.SetImplementation(new AndroidAppUpdateBridgeImpl(this));
}
3. Use from shared code
using AndroidAppUpdateBridge.Interop;
// Check whether an update is available
var info = await AppUpdateBridgeManager.CheckForUpdateAsync();
if (info.Availability == UpdateAvailability.UpdateAvailable)
{
if (info.ImmediateAllowed)
{
// Blocks the user until updated
var result = await AppUpdateBridgeManager.StartImmediateUpdateAsync();
}
else if (info.FlexibleAllowed)
{
// Downloads in background; prompt user to restart when ready
var progress = new Progress<FlexibleUpdateProgress>(p =>
{
if (p.IsDownloaded)
AppUpdateBridgeManager.CompleteFlexibleUpdate();
});
var result = await AppUpdateBridgeManager.StartFlexibleUpdateAsync(progress);
}
}
Update types
| Type | Behaviour |
|---|---|
| Immediate | Full-screen UI blocks the app until the update is installed. Best for critical updates. |
| Flexible | Downloads in the background; user continues using the app. Call CompleteFlexibleUpdate() after IsDownloaded to trigger install. |
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net10.0-android36.0
- Xamarin.Google.Android.Play.App.Update (>= 2.1.0.18)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.