package com.nielsen.simplestandardandroid8200.models;

import android.content.Context;

import com.nielsen.app.sdk.AppSdk;
import com.nielsen.app.sdk.IAppNotifier;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by abdul on 06/02/18.
 */

public class NielsenInit {

    private AppSdk mAppSdk = null;

    public AppSdk initAppSdk(Context mContext, IAppNotifier appNotifier){

        try {

            //Initialising the NielsenAppSDK class by passing app information which returns the instance of AppSdk.

            JSONObject appInformation = new JSONObject()

                    .put("appid", "PE4A57F64-878D-4D69-8EFB-4E87C27BA7A4")
                    .put("appversion", "1.0")
                    .put("nol_devDebug", "DEBUG");

            mAppSdk = new AppSdk(mContext, appInformation, appNotifier);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return mAppSdk;
    }
}
