-
Login to Datazoom here: https://app.datazoom.io
-
Add a Collector as indicated here: How to add a Collector
-
Copy the
Config
that 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>
with the Key you copied above.
5. Replace the <url given by Datazoom>
with <https://platform.datazoom.io/beacon/v1/>
Adding dependencies to your project
-
(a) You can download the latest version of the library file from the below URL and add it into your project's libs directory
https://gitlab.com/datazoom/mobile-android-group/mobile-android-collector-libraries-release/tree/master/com/datazoom/android/bitmovin-collector
else you can follow step (b)
(b) Add following maven repository URL in your project's build.gradle file
Maven
maven { url 'https://gitlab.com/datazoom/mobile-android-group/mobile-android-collector-libraries-release/raw/master' }
Add following dependency in your project's build.gradle file's
dependencies block
Mavendependencies { implementation 'com.datazoom.android:bitmovin-collector:1.9.0' }
-
Add following compile options if you don't have it already
compileOptionscompileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
-
Add retrofit library to your project
retrofitdependencies { implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.google.code.gson:gson:2.8.5' }
-
Use the following code snippet to add BitmovinPlayerCollector to your project.
Following code snippet illustrates the usage of BitmovinPlayer collector. Open demo application's MainActivity.java to see a running example.String configId = <configuration id from Datazoom>; String configUrl = <url given by Datazoom>; BitmovinPlayerCollector.create(player, MainActivity.this) .setConfig(new DatazoomConfig(configId, configUrl)) .connect(new DatazoomCollector.ConnectionListener() { public void onSuccess(DZEventCollector dzEventCollector) { //Everything is setup, collector initialization complete. } public void onError(Throwable t) { //Error while creating bitmovin player collector //showAlert("Error", "Error while creating BitmovinPlayerCollector, error:" + t.getMessage()); } });
Comments
0 comments
Article is closed for comments.