Skip to content

Latest commit

 

History

History
144 lines (109 loc) · 5.48 KB

getting-started.md

File metadata and controls

144 lines (109 loc) · 5.48 KB

Getting started

The Adobe Streaming Media for Edge Network extension has specific configuration requirements for including the Media Collection Details field group in the XDM schema and enabling Media Analytics in a datastream configuration. For more details, please refer to this guide to configure and set up Adobe Streaming Media for Edge Network.

Configure and install dependencies

The Adobe Streaming Media for Edge Network mobile extension has the following dependencies, which must be installed prior to installing the extension:

Configure Media for Edge Network extension in the Data Collection Tags

  1. In the Data Collection Tags, select the Extensions tab in your mobile property.
  2. On the Catalog tab, locate the Adobe Streaming Media for Edge Network extension, and select Install.
  3. Type the extension settings for Channel, Player Name, and Application Version.
  4. Select Save.
  5. Follow the publishing process to update your SDK configuration.

Configure Media for Edge Network extension

Optionally, the Media for Edge Network configuration may be set or changed programmatically.

Configuration keys

Name Key Value Required
Channel "edgeMedia.channel" String Yes
Player Name "edgeMedia.playerName" String Yes
Application Version "edgeMedia.appVersion" String No
Java
```java
Map<String, Object> mediaConfiguration = new HashMap<>();
mediaConfiguration.put("edgeMedia.channel", "<YOUR_CHANNEL_NAME>");
mediaConfiguration.put("edgeMedia.playerName", "<YOUR_PLAYER_NAME>");
mediaConfiguration.put("edgeMedia.appVersion", "<YOUR_APP_VERSION>");

MobileCore.updateConfiguration(mediaConfiguration);
```
Kotlin
```koltin
val mediaConfiguration = mapOf<String, Any>(
    "edgeMedia.channel" to "<YOUR_CHANNEL_NAME>", 
    "edgeMedia.playerName" to "<YOUR_PLAYER_NAME>", 
    "edgeMedia.appVersion" to "<YOUR_APP_VERSION>"
)
MobileCore.updateConfiguration(mediaConfiguration)
```

Add Media for Edge Network extension to your app

  1. Installation via Maven & Gradle is the easiest and recommended way to get the AEP SDK into your Android app. Add the Mobile Core, Edge, EdgeIdentity, and EdgeMedia extensions to your project using the app's Gradle file:

    Kotlin

    implementation(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

    implementation 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'

Warning
Using dynamic dependency versions is not recommended for production apps. Refer to this page for managing Gradle dependencies.

  1. Import the libraries:

    Java

    import 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

    import 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
  2. Import the Media library into your project and register it with MobileCore

    Java

    public class MainApp extends Application {
         private final String ENVIRONMENT_FILE_ID = "YOUR_APP_ENVIRONMENT_ID";
    
         @Override
         public void onCreate() {
             super.onCreate();
    
             MobileCore.setApplication(this);
             MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);
    
             List<Class<? extends Extension>> extensions = Arrays.asList(
                     Media.EXTENSION, Edge.EXTENSION, Identity.EXTENSION);
             MobileCore.registerExtensions(extensions, o -> {
                 Log.d(LOG_TAG, "AEP Mobile SDK is initialized");
             });
         }
     }

    Kotlin

    class 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(Media.EXTENSION, Edge.EXTENSION, Identity.EXTENSION)
            MobileCore.registerExtensions(extensions) {
                Log.d(LOG_TAG, "AEP Mobile SDK is initialized")
            }
        }
    }

Next steps

Get familiar with the various APIs offered by the AEP SDK by checking out the Media API reference.