MarketingCloudSDK.Net.Android 11.0.1.2

dotnet add package MarketingCloudSDK.Net.Android --version 11.0.1.2
                    
NuGet\Install-Package MarketingCloudSDK.Net.Android -Version 11.0.1.2
                    
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="MarketingCloudSDK.Net.Android" Version="11.0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarketingCloudSDK.Net.Android" Version="11.0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="MarketingCloudSDK.Net.Android" />
                    
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 MarketingCloudSDK.Net.Android --version 11.0.1.2
                    
#r "nuget: MarketingCloudSDK.Net.Android, 11.0.1.2"
                    
#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 MarketingCloudSDK.Net.Android@11.0.1.2
                    
#: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=MarketingCloudSDK.Net.Android&version=11.0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=MarketingCloudSDK.Net.Android&version=11.0.1.2
                    
Install as a Cake Tool

MarketingCloudSDK.Net.Android

NuGet release Targets: net8.0 | net9.0 | net10.0 marketingcloudsdk 11.0.1 Licence: MIT AND BSD-3-Clause

.NET for Android bindings for the Salesforce Marketing Cloud MobilePush module (com.salesforce.marketingcloud:marketingcloudsdk) — push registration, inbox, in-app messages, geofence and beacon messaging — at the v11 Unified SDK generation.

dotnet add package MarketingCloudSDK.Net.Android
using Com.Salesforce.Marketingcloud;
using Com.Salesforce.Marketingcloud.Sfmcsdk;

var context = Android.App.Application.Context;
var config = MarketingCloudConfig.InvokeBuilder()
    .SetApplicationId("your-app-id")
    .SetAccessToken("your-access-token")
    .SetMarketingCloudServerUrl("https://your-tenant.device.marketingcloudapis.com/")
    .SetMid("your-mid")
    .Build(context);

// Configure the container, not the module: MarketingCloudConfig is an EngagementModuleConfig,
// and SFMCSdk.Configure is what supplies the module the components it initializes with.
// MarketingCloudSdk.Init is the pre-Unified-SDK entry point and no longer initializes anything.
SFMCSdk.Configure(context, new SFMCSdkModuleConfig.Builder { EngagementModuleConfig = config }.Build(), status => { });

// The Action overload is this package's addition - natively RequestSdk takes a listener interface.
MarketingCloudSdk.RequestSdk(sdk =>
    sdk.RegistrationManager.Edit().AddTag("dotnet").Commit());

The SFMC SDK core (SFMCSDK.Net.Android) arrives as a dependency of this package, mirroring how the native umbrella depends on sfmcsdk. iOS lives in the sibling MarketingCloudSDK.Net.iOS; a cross-platform ergonomic layer lives in MarketingCloudSDK.Net.


Contents

Packages

Package Wraps Depends on What it is for
MarketingCloudSDK.Net.Android marketingcloudsdk 11.0.1 + 6 module .aars SFMCSDK.Net.Android, Xamarin.Firebase.Messaging, Play services, AndroidX Push registration, inbox, in-app messages, geofence/beacon messaging

Versions are <marketingcloudsdk version>.<binding revision> — for example, 11.0.1.2 means marketingcloudsdk 11.0.1, binding revision 2.

What is bound

The umbrella module's public surface, generated by class-parse with Java-package-derived namespaces (com.salesforce.marketingcloudCom.Salesforce.Marketingcloud): MarketingCloudSdk, MarketingCloudConfig, notifications.*, registration.*, messages.inbox.*, messages.iam.*, geofence/proximity messaging, analytics listeners.

Deliberately not projected, while still shipping in the package for the SDK's own use:

  • The modular feature .aars (pushfeaturemodule, pushmodelsmodule, inappmessaging*module, common, legacy-crypto) — v11 internals with no C#-reachable API, whose Kotlin shapes (covariant Parcelable creators, erased generics) the binding generator cannot project. They ride payload-only.
  • com.salesforce.marketingcloud.push.* — the v11 rich-push template rendering machinery, reached only by the SDK's own renderers. The customization surface consumers actually use is notifications.*, which is fully bound.

The full roster with reasons lives in build/packages.tsv; every removal or rename is documented in Transforms/Metadata.xml.

Installing

<PackageReference Include="MarketingCloudSDK.Net.Android" Version="11.0.1.2" />

Target frameworks: net8.0-android34.0, net9.0-android35.0, net10.0-android36.0. The SFMC SDK's own floor is Android 8.0 (API 26).

net8 note. Xamarin.AndroidX.Activity 1.12.0 — the .pom's version — ships no net8 asset, so the net8 head pins 1.11.0. That revision and Xamarin.AndroidX.Fragment.Ktx 1.8.9 (also the last with a net8 asset) sit a generation apart, so the net8 group additionally floors Lifecycle.ViewModelSavedState, Lifecycle.ViewModel.Ktx, Lifecycle.Runtime.Ktx and SavedState.SavedState.Ktx — without them NuGet cannot resolve the graph and a net8 restore fails with NU1107. The net9/net10 heads carry the .pom-exact versions and none of the extra floors.

Push prerequisites

The binding does not change what MobilePush itself needs:

  • A Firebase project: google-services.json in your app (or a manual SetSenderId), and the POST_NOTIFICATIONS runtime permission on Android 13+ — request it, or the notification never shows. The sample requests it.
  • A Marketing Cloud app id / access token / tenant URL / MID from MobilePush app administration. Never commit them; the sample takes them as runtime input.
  • Contact-key writes moved to the unified identity at v11 — SFMCSdk.Identity in the SFMCSDK.Net.Android dependency; the registration editor here carries tags and attributes.

How this repository works

Nothing native is committed. The seven .aars resolve from Salesforce's own Maven repository (the group is not on Maven Central) and every byte is checked against the SHA-256 pins in build/maven-checksums.txt. This repository takes the direct-download path on every target framework — the .poms import Google-hosted BOMs that @(AndroidMavenLibrary) cannot resolve from one repository — so build/verify-pom-deps.py is the automated check that the NuGet dependency mapping matches the .pom chain (30 declarations across 7 .poms).

build/BuildNugets.sh packs twice (net9 band, then net10 from a scratch global.json) and build/merge-packages.py grafts the net10 assets into one package.

Layout

Path What
src/Sfmc.Binding.props TFM bands, Maven resolution, checksum verification, packaging — kept a one-file port from the sibling SFMCSDK.Net.Android
src/MarketingCloudSDK.Net.Android/ The binding: Transforms/, consumer R8 rules under buildTransitive/
build/ Pack, checksum, R8-rule, .pom-verification and upgrade scripts; packages.tsv is the roster
tests/ PackageTests (nupkg shape) and DeviceTests (a bare Activity driving the real SDK on an emulator)
samples/ A MAUI app driving configuration, registration and inbox
.github/workflows/ pr, release, auto-release, upstream-drift/upstream-watch

Building locally

./build/BuildNugets.sh
dotnet test tests/MarketingCloudSDK.Net.Android.PackageTests

The device tests and sample restore SFMCSDK.Net.Android from nuget.org (or from ./artifacts if you drop the sibling's package there).

Tests

dotnet test tests/MarketingCloudSDK.Net.Android.PackageTests
./.github/scripts/run-emulator-tests.sh 11.0.1.2 net9.0-android35.0        # needs a running emulator
./.github/scripts/run-emulator-tests.sh 11.0.1.2 net9.0-android35.0 r8    # the shrunk leg

The device tests run without credentials on purpose: they prove the native classes across all seven .aars are present, the JNI surface works and configuration reaches the SDK — not that a tenant accepts the traffic.

Upgrading the SFMC SDK

Read the new umbrella .pom, update the module version properties in Directory.Build.props (and bump the sibling SFMCSDK.Net.Android first if sfmcsdk moved), then:

./build/BumpNativeVersion.sh 11.1.0

verify-pom-deps.py fails the run if any pin disagrees with the .pom chain. The upstream-watch workflow files an issue when Salesforce ships versions this repository does not bind.

Releasing

Merging a file named docs/release-notes/<four-part-version>.md to main is the release — auto-release tags it, release packs and publishes to nuget.org via trusted publishing. Every PR publishes a -beta.<pr>.<run> prerelease.

Troubleshooting

The SDK throws during Configure. Almost always the missing NotificationCustomizationOptions — the native SDK requires it.

No push token arrives. Firebase is not configured: the app needs google-services.json (and on Android 13+, the granted POST_NOTIFICATIONS permission). The registration completes; the token field stays empty.

ClassNotFoundException in Release builds only. Your app shrinks with R8. The package ships consumer keep-rules under buildTransitive/ that attach automatically; check they are not overridden.

JAVA0000: Type androidx.compose.runtime.annotation... is defined multiple times. The 2026 AndroidX generation ships Compose.Runtime.Annotation as both an -Android .aar and a -Jvm .jar, and the transitive graph resolves both. Add to your app:

<PackageReference Include="Xamarin.AndroidX.Compose.Runtime.Annotation.Jvm" Version="1.9.5" ExcludeAssets="all" />

A type you need is not bound. If it lives under com.salesforce.marketingcloud.push.* or a feature module, see What is bound — file an issue and it gets promoted.

Licence

The binding code in this repository is MIT. The native SFMC SDK artifacts inside the package are © Salesforce, BSD-3-Clause. The package licence expression is MIT AND BSD-3-Clause and both texts ship in every package under licenses/.

Product Compatible and additional computed target framework versions.
.NET net8.0-android34.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MarketingCloudSDK.Net.Android:

Package Downloads
MarketingCloudSDK.Net

One cross-platform API for Salesforce Marketing Cloud MobilePush: awaitable initialization with real credentials, identity (contact key and attributes) via the SFMC SDK core, registration reads and tag/attribute edits on Android and iOS from shared code, over the MarketingCloudSDK.Net.Android and MarketingCloudSDK.Net.iOS bindings. Restores on plain target frameworks too, so shared class libraries and unit tests need no platform conditionals.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1.2 192 7/30/2026
11.0.1.2-beta.8.17 57 8/3/2026
11.0.1.2-beta.8.16 60 8/3/2026
11.0.1.2-beta.6.13 47 7/30/2026
11.0.1.2-beta.6.12 55 7/30/2026
11.0.1.2-beta.5.14 51 7/30/2026
11.0.1.2-beta.5.11 43 7/30/2026
11.0.1.2-beta.4.10 54 7/30/2026
11.0.1.2-beta.3.9 57 7/30/2026
11.0.1.2-beta.3.6 53 7/30/2026
11.0.1.1 106 7/30/2026
11.0.1.1-beta.1.4 60 7/30/2026
11.0.1.1-beta.1.3 58 7/30/2026
8.2.0.8 8,632 10/30/2024
8.2.0.6 192 10/7/2024
8.1.5.10 187 7/12/2024
8.1.5.4 168 7/12/2024
8.1.5.3 209 5/20/2024
8.1.5.2 203 5/17/2024
8.0.7.82 486 2/28/2024
Loading failed

## What's changed

A binding revision on the same native line: **marketingcloudsdk 11.0.1** and the six module
`.aar`s are exactly what `11.0.1.1` shipped, and the core pin stays **SFMCSDK.Net.Android
3.1.1.1**. What moved is the `net8.0-android34.0` dependency group.

- **`net8.0-android34.0` restores again.** `11.0.1.1` could not be consumed from a net8 app at
 all: restore failed with `NU1107` on `Lifecycle.ViewModel`, `Lifecycle.Runtime` and
 `SavedState` in turn. The net8 head pins the last revisions of `Xamarin.AndroidX.Activity`
 (1.11.0) and `Xamarin.AndroidX.Fragment.Ktx` (1.8.9) that still carry a net8 asset, and the two
 sit a generation apart — Activity floors Lifecycle at 2.9.3, while the `.Ktx` facades
 Fragment.Ktx brings in cap those same packages below that floor with exact ranges
 (`[2.9.2.1, 2.9.3)`), and NuGet cannot reconcile disjoint ranges. The net8 group now floors
 `Lifecycle.ViewModelSavedState`, `Lifecycle.ViewModel.Ktx` and `Lifecycle.Runtime.Ktx` at 2.9.4
 and `SavedState.SavedState.Ktx` at 1.3.3 — the line all three agree on. Same AndroidX generation
 as the graph already resolved to: nothing is downgraded and no new `.aar` enters the app.
 `net9.0-android35.0` and `net10.0-android36.0` resolve without help, were never affected, and
 declare none of the extra floors.
- **The README quick-start now actually initializes the SDK.** `MarketingCloudSdk.Init` is the
 pre-Unified-SDK entry point and initializes nothing at v11 — configuration goes through
 `SFMCSdk.Configure(context, SFMCSdkModuleConfig, callback)` with `MarketingCloudConfig`
 attached as the engagement module config. The emulator smoke tests and the sample app configure
 the same way, so the path the documentation shows is the path CI exercises.

Upgrading from `11.0.1.1` is a version bump and nothing else; no API changed.