Datazoom’s framework facilitates Android applications using the Akamai Adaptive Media Player for Android to send video playback events based on the configuration created in data pipes.
- Login to Datazoom here: https://app.datazoom.io
- Add a Collector as indicated here: How to add a Collector
- Copy the
config keythat was created at the end of the process
Click the icon indicated below to copy the Configuration Key
You will see this message:
4. Replace the
<configuration id from Datazoom>in your
AkamaiPlayerCollector project with the Key you copied above.
5. Replace the
<url given by Datazoom> with
Adding dependencies to your project
This library uses the amp-core library from Akamai Premier releases:
AMP for Devices - Premier: Android Build 9.3.1 (https://mdtp-a.akamaihd.net/amp-android-sdk/premier)
Add the following maven repository URL in your project's build.gradle file
Add the following dependency in your project's build.gradle file's dependencies block
Add following compile options if you don't have it already
Append the following rules to the
proguard-rulesfiles, if you are using them in your app.
Add AMP Core library to your projectThe Datazoom collector library uses the amp-core library for data collection.
We've excluded the amp-core library from the collector library for customer convenience.
The version and link to download the core library is: AMP for Devices - Premier: Android Build 9.3.1 (https://mdtp-a.akamaihd.net/amp-android-sdk/premier)
Add the following additional dependencies to your project
Use the following code snippet to add AkamaiPlayerCollector to your project.
The following code snippet illustrates the usage of the AkamaiPlayer collector. Open demo application's
MainActivity.javato see a running example.
Custom Events & Metadata
Datazoom allows customers to collect custom events and metadata that don't originate from a video player.
Create a JSONArray with necessary metadata
Add the metadata to DZEventCollector
Create an Event object
The first constructor parameter is the event name, and the second is a list of custom metadata to be included in the event.
Add the event to DZEventCollector
Google IMA Ad Integration
Add the following dependencies in your project's build.gradle file's dependencies block.
Setup Google IMA Ad listener.
After the collector initialization call this method.