Rich Media

 

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 or paused, a hit will be automatically sent in order to stop measurement.

@Override
protected void onResume() {
    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)
  • sendPause: Sends a hit when media has been paused
  • sendStop: Sends a hit when media playback has been stopped completely
  • sendMove : Sends a hit when the player’s play cursor has been moved
  • >= v.2.9.0 :
    • sendPlay(SparseIntArray refreshDurations) : custom refresh interval can be defined
    • sendPlayWithoutRefresh() :Sends a media play hit without refresh
    • sendResume() : Resume media tracking preserved updated intervals
 

Video

The MediaPlayer object makes a Videos object available. This object exposes the following methods:

  • add: Enables the addition of a video to the player and returns a Video object
  • remove: Deletes a video
  • removeAll: Deletes all videos
 

Tagging examples

  1. Tagging a video play with refresh period by default
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            /// < 2.9.0 
            video.sendPlay(0); 
    
            /// >= 2.9.0
            video.sendPlayWithoutRefresh();
    
            /// >= 2.10.0 (with buffering)
            video.sendPlayWithoutRefresh(true);
        }
    }
  2. Tagging a video play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            
            // < 2.9.0
            // Refresh period : 5s
            video.sendPlay();
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            video.sendPlay();
    
            /// >= 2.10.0 (with buffering)
            video.sendPlay(true);
    
            // < 2.9.0
            // Refresh period : 10s
            video.sendPlay(10);
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            video.sendPlay(refresh);
    
            /// >= 2.10.0 (with buffering)
            video.sendPlay(refresh, true);
        }
    }
  3. Tagging a video with full information
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 20);
            video.setAction(RichMedia.Action.Play);
            video.setBuffering(false);
            video.setMediaTheme1("Theme");
            video.setMediaTheme2("Sub-Theme");
            video.setMediaTheme3("Sub-Sub-Theme");
            video.setMediaLabel("Label");
            video.setLevel2(15);
            video.setDuration(90);
            video.setEmbedded(false);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            /// < 2.9.0 video.sendPlay(0); /// >= 2.9.0
            video.sendPlayWithoutRefresh();
        }
    }
  4. Tagging a video ‘pause’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            video.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            video.sendPause();
        }
    }
  5. Tagging a video ‘stop’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            video.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            video.sendStop();
        }
    }
  6. Tagging video information
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            video.sendPlay();
    
            video.sendInfo();
            /// With buffering
            video.sendInfo(true);
        }
    }
  7. Tagging others action on the video
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.Video;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Video video;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            video = player.Videos().add("The Movie", 90);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            video.sendPlay();
        }
    
        // Custom method
        private void othersActions(){
            video.sendMove();
            video.sendShare();
            video.sendEmail();
            video.sendDownload();
            video.sendFavor();
        }
    }
 

LiveVideo

The MediaPlayer object makes a LiveVideos object available. This object exposes the following methods:

  • add: Enables the addition of a live video to the player and returns a LiveVideo object
  • remove: Deletes a live video
  • removeAll: Deletes all live videos
 

Tagging examples

  1. Tagging a live video play without refresh
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            /// < 2.9.0
            liveVideo.sendPlay(0);
    
            /// >= 2.9.0
            liveVideo.sendPlayWithoutRefresh();
    
            /// >= 2.10.0 (with buffering)
            liveVideo.sendPlayWithoutRefresh(true);
        }
    }
  2. Tagging a live video play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            
            // < 2.9.0
            // Refresh period : 5s
            liveVideo.sendPlay();
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            liveVideo.sendPlay();
    
            /// >= 2.10.0 (with buffering)
            liveAudio.sendPlay(true);
    
            // < 2.9.0
            // Refresh period : 10s
            liveVideo.sendPlay(10);
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            liveVideo.sendPlay(refresh);
    
            /// >= 2.10.0 (with buffering)
            liveVideo.sendPlay(refresh, true);
        }
    }
  3. Tagging a live video ‘pause’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveVideo.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            liveVideo.sendPause();
        }
    }
  4. Tagging a live video ‘stop’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveVideo.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            liveVideo.sendStop();
        }
    }
  5. Tagging video live information
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveVideo.sendPlay();
    
            liveVideo.sendInfo();
            /// with buffering
            liveVideo.sendInfo(true);
        }
    }
  6. Tagging others actions on the video live
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    import com.atinternet.tracker.LiveVideo;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveVideo liveVideo;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveVideo = player.LiveVideos().add("LiveVideo");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveVideo.sendPlay();
        }
    
        // Custom method
        private void othersAction() {
            liveVideo.sendMove();
            liveVideo.sendShare();
            liveVideo.sendDownload();
            liveVideo.sendFavor();
            liveVideo.sendEmail();
        }
    }
 

Audio

The MediaPlayer object makes an Audios object available. This object exposes the following methods:

  • add: Enables the addition of audio media to the player and returns an Audio object.
  • remove: Deletes an audio media
  • removeAll: Deletes all audio media
 

Tagging examples

  1. Tagging audio media play without refresh
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            /// < 2.9.0
            audio.sendPlay(0);
    
            /// >= 2.9.0
            audio.sendPlayWithoutRefresh();
    
            /// >= 2.10.0 (with buffering)
            audio.sendPlayWithoutRefresh(true);
        }
    }
  2. Tagging audio media play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            
            // < 2.9.0
            // Refresh period : 5s
            audio.sendPlay();
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            audio.sendPlay();
    
            /// >= 2.10.0 (with buffering)
            audio.sendPlay(true);
    
            // < 2.9.0
            // Refresh period : 10s
            audio.sendPlay(10);
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            audio.sendPlay(refresh);
    
            /// >= 2.10.0 (with buffering)
            audio.sendPlay(refresh, true);
        }
    }
  3. Tagging an audio media ‘pause’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            audio.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            audio.sendPause();
        }
    }
  4. Tagging an audio media ‘stop’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            audio.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            audio.sendStop();
        }
    }
  5. Tagging information audio
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            audio.sendPlay();
    
            audio.sendInfo();
            /// With buffering
            audio.sendInfo(true);
        }
    }
  6. Tagging others action on the audio
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Audio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Audio audio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            audio = player.Audios().add("NewSong", 4);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            audio.sendPlay();
        }
    
        // Custom method
        private void othersActions(){
            audio.sendMove();
            audio.sendShare();
            audio.sendEmail();
            audio.sendDownload();
            audio.sendFavor();
        }
    }
 

LiveAudio

The MediaPlayer object makes a LiveAudios object available. This object exposes the following methods:

  • add: Enables the addition of live audio media to the player and returns a LiveAudio object.
  • remove: Deletes a live audio media
  • removeAll: Deletes all live audio media
 

Tagging examples

  1. Tagging a live audio media play without refresh
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            /// < 2.9.0
            liveAudio.sendPlay(0);
    
            /// >= 2.9.0
            liveAudio.sendPlayWithoutRefresh();
    
            /// >= 2.10.0 (with buffering)
            liveAudio.sendPlayWithoutRefresh(true);
        }
    }
  2. Tagging a live audio media play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            
            // < 2.9.0
            // Refresh period : 5s
            liveAudio.sendPlay();
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            liveAudio.sendPlay();
    
            /// >= 2.10.0 (with buffering)
            liveAudio.sendPlay(true);
    
            // < 2.9.0
            // Refresh period : 10s
            liveAudio.sendPlay(10);
    
            // >= 2.9.0
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            liveAudio.sendPlay(refresh);
    
            /// >= 2.10.0 (with buffering)
            liveAudio.sendPlay(refresh, true);
        }
    }
  3. Tagging a live audio media ‘pause’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveAudio.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            liveAudio.sendPause();
        }
    }
  4. Tagging a live audio media ‘stop’
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveAudio.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            liveAudio.sendStop();
        }
    }
  5. Tagging information live audio
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveAudio.sendPlay();
    
            liveAudio.sendInfo();
            /// With buffering
            liveAudio.sendInfo(true);
        }
    }
  6. Tagging others actions on the live audio
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveAudio;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveAudio liveAudio;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveAudio = player.LiveAudios().add("LiveAudio");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveAudio.sendPlay();
        }
    
        // Custom method
        private void othersActions(){
            liveAudio.sendMove();
            liveAudio.sendShare();
            liveAudio.sendEmail();
            liveAudio.sendDownload();
            liveAudio.sendFavor();
        }
    }
  •  

    Medium

The MediaPlayer object makes a Media object available. This object exposes the following methods:

  • add : Enables the addition of medium to the player and returns a Medium object
  • remove : Deletes a medium
  • removeAll : Deletes all media
 

Tagging examples

  1. Tagging play medium without refresh
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            medium.sendPlayWithoutRefresh();
        }
    }
  2. Tagging a medium play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
    
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            medium.sendPlay();
    
            /// (with buffering)
            medium.sendPlay(true);
    
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            medium.sendPlay(refresh);
    
            /// (with buffering)
            medium.sendPlay(refresh, true);
        }
    }
  3. Tagging medium pause
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            medium.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            medium.sendPause();
        }
    }
  4. Tagging medium stop
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            medium.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            medium.sendStop();
        }
    }
  5. Tagging information medium
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            medium.sendPlay();
    
            medium.sendInfo();
            /// with buffering
            medium.sendInfo(true);
        }
    }
  6. Tagging others actions on the medium
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.Medium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private Medium medium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            medium = player.Media().add("MyMedium", "customType", 3);
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            medium.sendPlay();
        }
    
        // Custom method
        private void othersActions(){
            medium.sendMove();
            medium.sendShare();
            medium.sendEmail();
            medium.sendDownload();
            medium.sendFavor();
        }
    }
  •  

    LiveMedium

The MediaPlayer object makes a LiveMedia object available. This object exposes the following methods:

  • add :Enables the addition of live medium to the player and returns a LiveMedium object
  • remove : Deletes a live medium
  • removeAll : Deletes all live media
 

Tagging examples

  1. Tagging medium play without refresh
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveMedium.sendPlayWithoutRefresh();
    
            /// (with buffering)
            liveMedium.sendPlayWithoutRefresh(true);
        }
    }
  2. Tagging a live medium play with refresh (refresh period cannot be less than 5 seconds)
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            
            // Refresh definitions : 
            // 0 < x < 1 min : 5s
            // 1 < x < 5 min : 15s
            // 5 < x < 10 min : 30s
            // 10 < x min : 1 min
            liveMedium.sendPlay();
    
            ///(with buffering)
            liveMedium.sendPlay(true);
    
            // Refresh definitions : 
            // 0 < x < 2 min : 10s
            // 2 < x < 6 min : 15s
            // 6 < x min : 30s
            SparseIntArray refresh = new SparseIntArray();
            refresh.append(0, 10);
            refresh.append(2, 15);
            refresh.append(6, 30);
            liveMedium.sendPlay(refresh);
    
            ///(with buffering)
            liveMedium.sendPlay(refresh, true);
        }
    }
  3. Tagging live medium pause
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveMedium.sendPlay();
        }
    
        @Override
        protected void onPause() {
            super.onPause();
            liveMedium.sendPause();
        }
    }
  4. Tagging live medium stop
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveMedium.sendPlay();
        }
    
        @Override
        protected void onStop() {
            super.onStop();
            liveMedium.sendStop();
        }
    }
  5. Tagging live medium information
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveMedium.sendPlay();
    
            liveMedium.sendInfo();
            /// with buffering
            liveMedium.sendInfo(true);
        }
    }
  6. Tagging others action on the live medium
    package com.atinternet.atinternetdemo;
    
    import android.app.Activity;
    import android.os.Bundle;
    
    import com.atinternet.tracker.ATInternet;
    import com.atinternet.tracker.LiveMedium;
    import com.atinternet.tracker.MediaPlayer;
    import com.atinternet.tracker.Tracker;
    
    public class MainActivity extends Activity {
    
        private Tracker tracker;
        private MediaPlayer player;
        private LiveMedium liveMedium;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            tracker = ATInternet.getInstance().getDefaultTracker();
            player = tracker.Players().add();
            liveMedium = player.LiveMedia().add("LiveMedium", "customType");
        }
    
        @Override
        protected void onResume() {
            super.onResume();
            liveMedium.sendPlay();
        }
    
        // Custom method
        private void othersActions(){
            liveMedium.sendMove();
            liveMedium.sendShare();
            liveMedium.sendEmail();
            liveMedium.sendDownload();
            liveMedium.sendFavor();
        }
    }
  •  

    Buffering management (>= 2.10.0)

Since 2.10.0 release, it’s possible to measure buffering delay for every media type

 

Tagging examples

package com.atinternet.atinternetdemo;

import android.app.Activity;
import android.os.Bundle;

import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Medium;
import com.atinternet.tracker.MediaPlayer;
import com.atinternet.tracker.Tracker;

public class MainActivity extends Activity {

    private Tracker tracker;
    private MediaPlayer player;
    private Medium medium;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tracker = ATInternet.getInstance().getDefaultTracker();
        player = tracker.Players().add();
        medium = player.Media().add("Medium", "customType", 56);
    }
}
  1. Starting a playback without buffering
    medium.sendPlay();
  2. Starting a playback with buffering
    medium.sendPlay(true);
  3. Resume the playback after buffering
    medium.sendInfo(false);
  4. Buffering for an ongoing playback
    medium.sendInfo(true);
 

Shared properties

NameTypeDefault valueDescription
mediaLabelStringEmpty stringGets or sets the label of the viewed media
mediaTheme1StringnullGets or sets the first theme
mediaTheme2StringnullGets or sets the second theme
mediaTheme3StringnullGets or sets the third theme
mediaLevel2Int-1Gets or sets the level 2 ID
isEmbeddedBool?falseIndicates if the media is external to the application
webdomainStringnullGets or sets the media referrer  in case of external placements (isEmbedded at true)
linkedContentStringnullGets or sets the label/name of the content related to an ad (pre-roll, mid-roll or post-roll)
 

MediaPlayer class

 

Properties

NameTypeDefault valueDescription
playerIdInt1Gets or sets the player ID
VideosVideosnullGets the instance allowing video management
AudiosAudiosnullGets the instance allowing audio media management
Media (>= 2.10.0)MedianullGets the instance allowing media management
LiveVideosLiveVideosnullGets the instance allowing live video management
LiveAudiosLiveAudiosnullGets the instance allowing live audio media management
LiveMedia (>= 2.10.0)LiveMedianullGets the instance allowing live media management

Management of player ID is automatic but you can nonetheless specify one.

 

Video class

 

Properties

NameTypeDefault valueDescription
durationInt0Gets or sets total video length, in seconds
 

Audio class

 

Properties

NameTypeDefault valueDescription
durationInt0Gets or sets total audio media length, in seconds
 

Medium class

 

Properties

NameTypeDefault valueDescription
durationInt0Gets or sets total media length, in seconds
 

Methods

NameReturn typeDescription
sendPlay() (< 2.9.0)voidSends a play hit with an automatic refresh of 5 seconds
sendPlay() (>=2.9.0)voidSends a play hit with an automatic refresh defined by interval
sendPlay(boolean isBuffering) (>=2.10.0)voidSends a play hit with an automatic refresh defined by interval with buffering specification
sendPlay(int refreshDuration) (deprecated in 2.9.0)voidSends the play hit with an automatic refresh, given in parameters (0 = refresh disabled)
sendPlay(SparseIntArray refreshDurations) (>= 2.9.0)voidSends the play hit with an automatic custom interval in parameters
sendPlay(SparseIntArray refreshDurations, boolean isBuffering) (>= 2.10.0)voidSends the play hit with an automatic custom interval in parameters with buffering specification
sendPlayWithoutRefresh() (>= 2.9.0)voidSends the play hit without refresh
sendPlayWithoutRefresh(boolean isBuffering) (>= 2.10.0)voidSends the play hit without refresh with buffering specification
sendResume() (>= 2.9.0)voidResume media tracking preserved state
sendResume(boolean isBuffering) (>= 2.10.0)voidResume media tracking preserved state with buffering specification
sendPausevoidSends ‘pause’ hit
sendStopvoidSends ‘stop’ hit
sendInfo() (>= 2.10.0)voidSends an information hit
sendInfo(boolean isBuffering) (>= 2.10.0)voidSends an information hit with buffering specification
sendMovevoidSends ‘play cursor’ movement hit
sendShare (>= 2.10.0)voidSends share hit
sendEmail (>= 2.10.0)voidSends email hit
sendFavor (>= 2.10.0)voidSends favor hit
sendDownload (>= 2.10.0)voidSends download hit
 

Was this post helpful?

Last update: 21/03/2019