Adobe Launch Extension Installation
Install the Adobe Launch Marketo extension to send push notifications, in-app messages, or both.
Prerequisites
- Add an application in Marketo Admin and obtain the application Secret Key and Munchkin Id.
- Configure the property in the Adobe Launch portal.
- Configure the application Secret Key and Munchkin ID for the property in the Adobe Launch portal.
- Optional: Set up push notifications.
How to Install Marketo Extension on iOS
Setup Swift Bridging Header
-
Go to File > New > File and select Header File.
-
Name the file “<ProjectName>-Bridging-Header”.
-
Go to Project > Target > Build Settings > Swift Compiler > Code Generation.
-
Add the following path to the “Objective-Bridging” Header:
$(PODS_ROOT)/<_ProjectName_>-Bridging-Header.h
Initialize Extension
Update the applicationDidBecomeActive method as follows.
| code language-objectivec |
|---|
|
Update the applicationDidBecomeActive method as follows.
| code language-objectivec |
|---|
|
iOS Test Devices
- Select Project > Target > Info > URL Types.
- Add the identifier ${PRODUCT_NAME}.
- Set URL Schemes to mkto-<S_ecret Key_>.
- Add
application:openURL:sourceApplication:annotation:toAppDelegate.m filefor Objective-C.
Handle Custom Url Type in AppDelegate
| code language-objectivec |
|---|
|
| code language-objectivec |
|---|
|
How to Install Marketo SDK on Android
Android Extension Setup
Follow the instructions in the Adobe Launch portal.
Configure Permissions
Open AndroidManifest.xml and add the following permissions. Your app must request the “INTERNET” and “ACCESS_NETWORK_STATE” permissions. Skip this step if the app already requests them.
<uses‐permission android:name="android.permission.INTERNET"></uses‐permission>
<uses‐permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses‐permission>
Initialize Extension
ProGuard Configuration (Optional)
If your app uses ProGuard, add the following lines to the proguard.cfg file in the project folder. This configuration excludes the Marketo SDK from obfuscation.
-dontwarn com.marketo.*
-dontnote com.marketo.*
-keep class com.marketo.**{ *; }
Android Test Devices
Add “MarketoActivity” to AndroidManifest.xml inside the application tag.
<activity android:name="com.marketo.MarketoActivity" android:configChanges="orientation|screenSize" >
<intent-filter android:label="MarketoActivity" >
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:host="add_test_device" android:scheme="mkto" />
</intent-filter>
</activity>
Firebase Cloud Messaging Support
The MME SDK for Android supports direct use of Google’s Firebase Cloud Messaging (FCM).
Adding FCM to your Application
-
Integrate the latest Marketo Android SDK into the Android app. See the steps on GitHub.
-
Configure the Firebase app in Firebase Console.
-
Create or add a project in Firebase Console.
- In the Firebase console, select Add Project.
- Select your GCM project from the list of existing Google Cloud projects, and select Add Firebase.
- In the Firebase welcome screen, select Add Firebase to your Android App.
- Provide your package name and SHA-1, and select Add App. A new
google-services.jsonfile for your Firebase app is downloaded. - Select Continue and follow the detailed instructions for adding the Google Services plugin in Android Studio.
-
Go to Project Settings in Project Overview.
- Select the General tab and download
google-services.json. - Select the Cloud Messaging tab. Copy the Server Key and Sender ID, and provide them to Marketo.
- Select the General tab and download
-
Configure FCM in the Android app.
-
Switch to the Project view in Android Studio to display the project root directory.
-
Move the downloaded
google-services.jsonfile into the Android app module root directory. -
In Project-level
build.gradleadd the following:code language-none buildscript { dependencies { classpath 'com.google.gms:google-services:4.0.0' } } -
In App-level build.gradle, add the following:
code language-none dependencies { compile 'com.google.firebase:firebase-core:17.4.0' } // Add to the bottom of the file apply plugin: 'com.google.gms.google-services' -
Select Sync now in the bar that appears in the IDE.
-
-
-
Edit the app manifest. The FCM SDK automatically adds the required permissions and receiver functionality. Remove the following obsolete elements, which might cause message duplication:
code language-xml <uses-permission android:name="android.permission.WAKE_LOCK" /> <permission android:name="<your-package-name>.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <uses-permission android:name="<your-package-name>.permission.C2D_MESSAGE" /> ... <receiver> android:name="com.google.android.gms.gcm.GcmReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <category android:name="<your-package-name> /> </intent-filter> </receiver>
-
FCM FAQ
These questions cover Firebase Cloud Messaging support.
Q: Where can I find instructions to update to the latest version of the MME SDK? See the installation instructions on the Marketo Developer site.
Q: Will updating to the latest version of the SDK require me to publish an updated version of my Android Application to my existing users? No.
Q: How does it affect existing MME customers with published Android apps that use the Marketo Android SDK? Migrate an existing Android GCM client app to Firebase Cloud Messaging (FCM) as follows:
- In the Firebase console, select Add Project.
- Select your GCM project from the list of existing Google Cloud projects, and select Add Firebase.
- In the Firebase welcome screen, select Add Firebase to your Android App.
- Provide your package name and SHA-1, and select Add App. A new google-services.json file for your Firebase app is downloaded.
- Select Continue and follow the detailed instructions for adding the Google Services plugin in Android Studio.
Q: Can we target leads created with the old Marketo SDK that used a GCM app? Yes. You can target all leads created with the Marketo SDK for push notifications.