Skip to content

uizaio/uiza-android-api-sdk

Repository files navigation

Welcome to UIZA Android API SDK

Read CHANGELOG here.

Importing the Library

Step 1. Add the JitPack repository to your build.gradle file

    allprojects {
          repositories {
             maven { url 'https://jitpack.io' }
          }
    }

Step 2. Add the dependency

    implementation 'com.github.uizaio:uiza-android-api-sdk:1.x.x'

Init SDK

  1. Init UZApi

    public class App extends MultiDexApplication {
           @Override
           public void onCreate() {
               super.onCreate();
               UZApi.init(this, <SdkVersion>, UZEnvironment.DEVELOPMENT);
           }
    }
  2. Call api

    UZApi.getLiveViewers(<app_id>, <entity_id>, liveCounter -> {
    		Timber.e("Views: %d", liveCounter.getViews());
    	}, Timber:e);

or

    UZApi.getLiveViewers(<link_play>, liveCounter -> {
    		Timber.e("Views: %d", liveCounter.getViews());
    	}, Timber:e);