Foreword

AT Internet’s SDK allows you to tag videos and audio media played by the user during app usage.

Get off to a good start

Once your tag has been initialised, you can begin tagging your videos and audio media.

If you want to use variables, be sure to import ATInternet, Tracker, MediaPlayer, Video, Audio, LiveVideo, LiveAudio, Medium and LiveMedium classes in your Activity.

Tagging

Rich Media tagging is not accounted for in the dispatch mechanism!

The tracker makes available a MediaPlayers object. This object exposes the following methods:

add: Enables the addition of a new player and returns a MediaPlayer object

remove: Delete a player

removeAll: Delete all players

When a player is deleted, if media is currently being played, a hit will be automatically sent in order to stop measurement.

Java

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

@Override

protectedvoidonResume(){

super.onResume();

// New player with ID

MediaPlayer player1=tracker.Players().add(78);

// New player with default ID

MediaPlayer player2=tracker.Players().add();

// Remove the player 78

tracker.Players().remove(78);

// Remove all the players

tracker.Players().removeAll();

}

Once a player is instantiated, it is possible to tag videos and audio media.

All objects listed below expose the following methods:

sendPlay:

< v2.9.0 : Sends a media play hit with a refresh hit sent automatically every 5 seconds

>= v.2.9.0 : Sends a media play hit with a refresh hit sent automatically with intervals defined like this:

Every 5 seconds during the first minute

Every 15 seconds between the second and the fifth minute

Every 30 seconds between the sixth and the tenth minute

Every minute for play duration > 10 minutes

sendPlay with int refresh period: Same as above, except it is possible to specify the refresh period (the specified parameter cannot be less than 5, which is the minimum period EXCEPT if the parameter is set to 0, in which case refreshing is not enabled!) (Deprecated in v2.9.0)