ExzileGames.AndroidAppUpdateBridge 1.0.24

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExzileGames.AndroidAppUpdateBridge" Version="1.0.24" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExzileGames.AndroidAppUpdateBridge" Version="1.0.24" />
                    
Directory.Packages.props
<PackageReference Include="ExzileGames.AndroidAppUpdateBridge" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ExzileGames.AndroidAppUpdateBridge --version 1.0.24
                    
#r "nuget: ExzileGames.AndroidAppUpdateBridge, 1.0.24"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ExzileGames.AndroidAppUpdateBridge@1.0.24
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ExzileGames.AndroidAppUpdateBridge&version=1.0.24
                    
Install as a Cake Addin
#tool nuget:?package=ExzileGames.AndroidAppUpdateBridge&version=1.0.24
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.25 97 4/9/2026
1.0.24 95 4/9/2026