MarketingCloudSDK.Net.Android 11.0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MarketingCloudSDK.Net.Android --version 11.0.1.1
                    
NuGet\Install-Package MarketingCloudSDK.Net.Android -Version 11.0.1.1
                    
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.1" />
                    
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.1" />
                    
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.1
                    
#r "nuget: MarketingCloudSDK.Net.Android, 11.0.1.1"
                    
#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.1
                    
#: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.1
                    
Install as a Cake Addin
#tool nuget:?package=MarketingCloudSDK.Net.Android&version=11.0.1.1
                    
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;

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);

// The Action overloads are this package's additions - natively both take listener interfaces.
MarketingCloudSdk.Init(context, config, status => { });

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>11.0.1.1 is marketingcloudsdk 11.0.1, binding revision 1.

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.1" />

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. The net9/net10 heads carry the .pom-exact versions.

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.1 net9.0-android35.0        # needs a running emulator
./.github/scripts/run-emulator-tests.sh 11.0.1.1 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 195 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 49 7/30/2026
11.0.1.2-beta.6.12 55 7/30/2026
11.0.1.2-beta.5.14 54 7/30/2026
11.0.1.2-beta.5.11 44 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 55 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,634 10/30/2024
8.2.0.6 192 10/7/2024
8.1.5.10 187 7/12/2024
8.1.5.4 169 7/12/2024
8.1.5.3 209 5/20/2024
8.1.5.2 203 5/17/2024
8.0.7.82 487 2/28/2024
Loading failed

## What's changed

First release of the rebuilt binding, at the v11 Unified SDK generation.

- Binds **marketingcloudsdk 11.0.1** (was 8.x in the retired `sfmc-net-bindings-mobile`
 packages) and ships the six modular `.aar`s of the Unified architecture alongside it
 (`pushfeaturemodule` 2.0.1, `pushmodelsmodule` 1.0.3, `inappmessagingfeaturemodule` /
 `inappmessagingmodelsmodule` 1.0.1, `common` 1.0.1, `legacy-crypto` 1.0.3), all resolved from
 Salesforce's own Maven repository and SHA-256-pinned.
- Depends on **SFMCSDK.Net.Android 3.1.1.1** for the core, mirroring the native layering — the
 old packages' `sed`-stitched cross-package versioning is gone.
- Target frameworks `net8.0-android34.0`, `net9.0-android35.0`, `net10.0-android36.0`; the
 `.targets` hack that copied natives inside the restored package folder is gone.
- Consumer R8 keep-rules ship under `buildTransitive/` — Release builds that shrink no longer
 lose the SDK's JNI-only entry points.
- Dependency mapping (Firebase BOM 34.6.0 era, Play services 18.x, 2026 AndroidX generation) is
 machine-checked against the `.pom` chain by `build/verify-pom-deps.py`.
- Migrating from `8.x`: initialization now goes through
 `SFMCSdk.Configure(context, SFMCSdkModuleConfig, callback)` with the push module config
 attached (see the README quick-start); the SDK floor is Android 8.0 (API 26); the
 `com.salesforce.marketingcloud.push.*` template internals are no longer projected to C#.