Adobe Streaming Media for Edge Network
The Media for Edge Network extension enables tracking user's engagement and consumption of audio and video content on mobile devices.
Before starting
Configure and Setup Adobe Streaming Media for Edge Network
- Define a report suite
- Set up the schema in Adobe Experience Platform
- Create a dataset in Adobe Experience Platform
- Configure a datastream in Adobe Experience Platform
Follow the full guide for setting up Adobe Streaming Media for Edge Network with Experience Platform Edge before configuring and implementing the SDK.
Configure and Install Dependencies
Media for Edge Network requires Edge and Edge Identity extensions. Make sure to configure the Edge extension in Data Collection UI and configure the Edge Identity extension in Data Collection UI before proceeding.
Configure Media for Edge Network extension in the Data Collection Tags
- In the Data Collection Tags, select the Extensions tab in your mobile property.
- On the Catalog tab, locate the Adobe Streaming Media for Edge Network extension, and select Install.
- Type the extension settings. For more information, see Configure Media for Edge Network extension.
- Select Save.
- Follow the publishing process to update your SDK configuration.
Configure the Media for Edge Network extension
To configure the Media for Edge Network extension, complete the following steps:
Channel
Type the channel name property.
Player name
Type the name of the media player in use (for example, AVPlayer, Native Player, or Custom Player).
Application version
Type the version of the media player application/SDK.
Add Media for Edge Network to your app
This extension requires the Edge Network extension and Identity for Edge Network extension. You must add the Adobe Experience Platform Edge Network
and Identity
extensions to your mobile property in the Data collection UI
and make sure they are correctly configured.
- Add the Media for Edge Network extension and its dependencies to your project using the app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edgemedia")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edgemedia'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the libraries in your application's main activity.
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.edge.identity.Identity;import com.adobe.marketing.mobile.edge.media.Media;
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Edgeimport com.adobe.marketing.mobile.edge.identity.Identityimport com.adobe.marketing.mobile.edge.media.Media
- To add the Media for Edge Network extension and its dependencies to your project, add the following pods to your
Podfile
:
Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdgeMedia', '~> 5.0'
- In Xcode project, import the Media extension:
Swift
Copied to your clipboardimport AEPCoreimport AEPEdgeimport AEPEdgeIdentityimport AEPEdgeMedia
Objective-C
Copied to your clipboard@import AEPCore;@import AEPEdge;@import AEPEdgeIdentity;@import AEPEdgeMedia;
- Add the Media for Edge Network extension and its dependencies to your project using the app's Gradle file.
Kotlin
Copied to your clipboardimplementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))implementation("com.adobe.marketing.mobile:core")implementation("com.adobe.marketing.mobile:edge")implementation("com.adobe.marketing.mobile:edgeidentity")implementation("com.adobe.marketing.mobile:edgemedia")
Groovy
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:edge'implementation 'com.adobe.marketing.mobile:edgeidentity'implementation 'com.adobe.marketing.mobile:edgemedia'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
- Import the libraries in your application's main activity.
Java
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.edge.identity.Identity;import com.adobe.marketing.mobile.edge.media.Media;
Kotlin
Copied to your clipboardimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Edgeimport com.adobe.marketing.mobile.edge.identity.Identityimport com.adobe.marketing.mobile.edge.media.Media
- To add the Media for Edge Network extension and its dependencies to your project, add the following pods to your
Podfile
:
Copied to your clipboardpod 'AEPCore', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdgeMedia', '~> 5.0'
- In Xcode project, import the Media extension:
Swift
Copied to your clipboardimport AEPCoreimport AEPEdgeimport AEPEdgeIdentityimport AEPEdgeMedia
Objective-C
Copied to your clipboard@import AEPCore;@import AEPEdge;@import AEPEdgeIdentity;@import AEPEdgeMedia;
Register Media with Mobile Core
To register Media with Mobile Core, import the Media library and register it:
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);List<Class<? extends Extension>> extensions = Arrays.asList(Edge.EXTENSION, Identity.EXTENSION, Media.EXTENSION);MobileCore.registerExtensions(extensions, o -> {Log.d(LOG_TAG, "AEP Mobile SDK is initialized");});}}
Kotlin
Copied to your clipboardclass MyApp : Application() {val ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)val extensions = listOf(Edge.EXTENSION, Identity.EXTENSION, Media.EXTENSION)MobileCore.registerExtensions(extensions) {Log.d(LOG_TAG, "AEP Mobile SDK is initialized")}}}
Swift
In your app's _:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Edge.self, Identity.self, Media.self], {MobileCore.configureWith(appId: "yourEnvironmentId")})...}
Objective-C
In your app's application:didFinishLaunchingWithOptions
, register Media with Mobile Core:
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileEdgeMedia.class, AEPMobileEdge.class, AEPMobileEdgeIdentity.class] completion:^{[AEPMobileCore configureWithAppId: @"yourEnvironmentId"];}];...}
To register Media with Mobile Core, import the Media library and register it:
Java
Copied to your clipboardpublic class MainApp extends Application {private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";@Overridepublic void onCreate() {super.onCreate();MobileCore.setApplication(this);MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);List<Class<? extends Extension>> extensions = Arrays.asList(Edge.EXTENSION, Identity.EXTENSION, Media.EXTENSION);MobileCore.registerExtensions(extensions, o -> {Log.d(LOG_TAG, "AEP Mobile SDK is initialized");});}}
Kotlin
Copied to your clipboardclass MyApp : Application() {val ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID"override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)val extensions = listOf(Edge.EXTENSION, Identity.EXTENSION, Media.EXTENSION)MobileCore.registerExtensions(extensions) {Log.d(LOG_TAG, "AEP Mobile SDK is initialized")}}}
Swift
In your app's _:didFinishLaunchingWithOptions
function, register the Audience Manager extension with the Mobile Core:
Copied to your clipboardfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {MobileCore.registerExtensions([Edge.self, Identity.self, Media.self], {MobileCore.configureWith(appId: "yourEnvironmentId")})...}
Objective-C
In your app's application:didFinishLaunchingWithOptions
, register Media with Mobile Core:
Copied to your clipboard- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore registerExtensions:@[AEPMobileEdgeMedia.class, AEPMobileEdge.class, AEPMobileEdgeIdentity.class] completion:^{[AEPMobileCore configureWithAppId: @"yourEnvironmentId"];}];...}
Configuration keys
To update your SDK configuration programmatically, use the following information to change your Media configuration values. For more information, see Configuration API reference.
Key | Required | Description | Data Type |
---|---|---|---|
edgeMedia.channel | Yes | The Channel name. For more information, see Channel. | String |
edgeMedia.playerName | Yes | The media player name, i.e., "AVPlayer", "HTML5 Player", "My Custom Player". For more information, see Player Name. | String |
edgeMedia.appVersion | No | Version of the media player app/SDK. For more information, see Application Version. | String |