MarketingCloud.MobilePushSDK.Android
1.0.3
dotnet add package MarketingCloud.MobilePushSDK.Android --version 1.0.3
NuGet\Install-Package MarketingCloud.MobilePushSDK.Android -Version 1.0.3
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="MarketingCloud.MobilePushSDK.Android" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MarketingCloud.MobilePushSDK.Android --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MarketingCloud.MobilePushSDK.Android, 1.0.3"
#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.
// Install MarketingCloud.MobilePushSDK.Android as a Cake Addin #addin nuget:?package=MarketingCloud.MobilePushSDK.Android&version=1.0.3 // Install MarketingCloud.MobilePushSDK.Android as a Cake Tool #tool nuget:?package=MarketingCloud.MobilePushSDK.Android&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Salesforce MarketingCloud MobilePush SDK Binding Project
This is a native Salesforce MarketingCloud MobilePush SDK Binding Project for Xamarin Android
SDKs (AAR):
- com.salesforce.marketingcloud:marketingcloudsdk
v8.0.8
- com.salesforce.marketingcloud:sfmcsdk
v1.0.2
- org.altbeacon:android-beacon-library
v2.19.3
- androidx.constraintlayout:constraintlayout
v2.1.4
Requirement (Xamarin Android):
- Android requires a minimum API
v21
- Xamarin.Firebase.Messaging
v123.1.1.1
- Xamarin.GooglePlayServices.Gcm
v117.0.0.8
- Xamarin.AndroidX.ConstraintLayout
v2.1.4.3
- File
google-service.json
set Build Action as GoogleServicesJson
Example:
// Necessary namespaces
using Com.Salesforce.Marketingcloud;
using Com.Salesforce.Marketingcloud.Sfmcsdk;
using Com.Salesforce.Marketingcloud.Notifications;
// Create a marketing cloud config
var marketingCloudConfig = Com.Salesforce.Marketingcloud.MarketingCloudConfig
.InvokeBuilder()
.SetApplicationId("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
.SetAccessToken("access token")
.SetSenderId("xxxxxxxxxxxx")
.SetMid("xxxxxxxxx")
.SetNotificationCustomizationOptions(NotificationCustomizationOptions.Create(0)) // where 0 is resource id your icon
.SetMarketingCloudServerUrl("https://xxxxxxxxxxxxxxxxxxx.device.marketingcloudapis.com/")
.SetInboxEnabled(true)
.SetAnalyticsEnabled(true)
.SetPiAnalyticsEnabled(true)
.SetGeofencingEnabled(true)
.SetProximityEnabled(true)
.Build(Application.Context);
// Init a SFMCSdk builder
var config = new SFMCSdkModuleConfig.Builder();
// Assign marketing cloud config to push mobile config
config.PushModuleConfig = marketingCloudConfig;
// Make a SFMCSdk builder
var builder = config.Build();
// Configure SFMCSdk
SFMCSdk.Configure(Application.Context, builder);
// Request listener as current class (ISFMCSdkReadyListener)
SFMCSdk.RequestSdk(this);
// SFMCSdk handler (here you can get a SDK status)
public void Ready(SFMCSdk sdk)
{
// There is a push connection status
}
Documents
Product | Versions Compatible and additional computed target framework versions. |
---|---|
MonoAndroid | monoandroid12.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
MonoAndroid 12.0
- Xamarin.AndroidX.ConstraintLayout (>= 2.1.4.3)
- Xamarin.Firebase.Messaging (>= 123.1.1.1)
- Xamarin.GooglePlayServices.Gcm (>= 117.0.0.8)
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.3 | 212 | 4/22/2023 |
Detailed description of the changes in this version.