AMP Android SDK: Adobe Heartbeat integration

Document created by Orlando Sanchez Martinez Employee on May 25, 2017Last modified by Orlando Sanchez Martinez Employee on May 25, 2017
Version 2Show Document
  • View in full screen mode


The rest of this guide assumes you have successfully integrated AMP's Core (you are able to play back a video).
It also assumes you have started conversations with a Comscore representative, for them to provide you some custom metadata specific to your Android app, that you will need in Point #5 of this guide (AdobeUserId, TrackingServer, Publisher, Channel, Ovp).

Getting started

For reference, check the AMPHeartbeatSample Android Studio sample project in the release package.
To integrate the plugin into your app, you need to:

1) Add the following files to your project libraries:
adobeMobileLibrary.jar (provided by Adobe)

VideoHeartbeat.jar (provided by Adobe)
amp-analytics-adobe-heartbeat.jar (provided by Akamai)


2) In the Activity where playback is handled, import the following Java packages:


3) Add an object of the AdobeHeartbeatAnalyticsTracker type in your Activity's members:

private AdobeHeartbeatAnalyticsTracker analytics;

4) Initialize that object, on the onResourceReady() method from the VideoPlayerContainerCallback:

private void initAnalytics() {
   analytics = new AdobeHeartbeatAnalyticsTracker(buildHeartbeatConfigurationData(),


5) The buildHeartbeatConfigurationData() method, returns a object. Check all it's set() methods, to send the appropriate values.
The is composed of the following:

  • import;
  • import;
  • import;

5.1) Alternatively, you can provide this data as an AMP Config file.


When creating the AdobeHeartbeatAnalyticsTracker, use the empty constructor (the HeartbeatConfigurationData and HeartbeatDetails will be constructed automatically from the .json configuration file).


6) If your app integrates ads, it should use the corresponding AMP Plugin for integration with Heartbeat. This example assumes Google IMA Ads.
Once the com.akamai.ima.AdsComponent is initialized, it has to send the different events to AMP's Nielsen object:



7) Reach out to an Adobe representative to get certified.
Please add to that email thread, so we can be in the loop.