ExzileGames.AndroidAnalyticsBridge
1.0.24
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ExzileGames.AndroidAnalyticsBridge --version 1.0.24
NuGet\Install-Package ExzileGames.AndroidAnalyticsBridge -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.AndroidAnalyticsBridge" Version="1.0.24" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExzileGames.AndroidAnalyticsBridge" Version="1.0.24" />
<PackageReference Include="ExzileGames.AndroidAnalyticsBridge" />
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.AndroidAnalyticsBridge --version 1.0.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ExzileGames.AndroidAnalyticsBridge, 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.AndroidAnalyticsBridge@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.AndroidAnalyticsBridge&version=1.0.24
#tool nuget:?package=ExzileGames.AndroidAnalyticsBridge&version=1.0.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ExzileGames.AndroidAnalyticsBridge
A pure C# wrapper for Firebase Analytics on .NET Android. Provides a clean Dictionary<string, object>-based event logging API over the Xamarin Firebase Analytics binding — no JNI bundle construction required in your app code.
Requirements
Your Android project must include a valid google-services.json file (downloaded from the Firebase Console) in its root directory. Firebase Analytics will not initialize without it.
Setup
1. Add project reference
<ProjectReference Include="..\AndroidAnalyticsBridge\AndroidAnalyticsBridge.csproj" />
2. Initialize in your Activity
using AndroidAnalyticsBridge.Interop;
protected override void OnCreate(Bundle? savedInstanceState)
{
base.OnCreate(savedInstanceState);
AnalyticsBridgeManager.SetImplementation(new AndroidAnalyticsBridgeImpl(this));
}
3. Use from shared code
using AndroidAnalyticsBridge.Interop;
// Log a simple event
AnalyticsBridgeManager.LogEvent("level_complete");
// Log an event with parameters
AnalyticsBridgeManager.LogEvent("purchase", new Dictionary<string, object>
{
["item_id"] = "redchest500",
["value"] = 4.99,
["currency"] = "USD"
});
// Set user ID (call with null to clear)
AnalyticsBridgeManager.SetUserId("user-12345");
// Set a custom user property
AnalyticsBridgeManager.SetUserProperty("player_tier", "gold");
// Disable collection (e.g. for GDPR opt-out)
AnalyticsBridgeManager.SetAnalyticsCollectionEnabled(false);
// Get the Firebase app instance ID
string? instanceId = await AnalyticsBridgeManager.GetAppInstanceIdAsync();
Supported Parameter Types
| C# Type | Firebase Bundle Method |
|---|---|
string |
PutString |
int |
PutInt |
long |
PutLong |
float |
PutFloat |
double |
PutDouble |
bool |
PutBoolean |
| anything else | PutString via ToString() |
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
-
net10.0-android36.0
- Xamarin.Firebase.Analytics (>= 123.0.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.