package com.bugsee.library;

import com.unity3d.player.UnityPlayerActivity;

import android.app.Application;
import android.os.Bundle;

import java.util.HashMap;

/**
 * Created by amigo on 26.06.17.
 */

public class BugseeUnityAdapter extends UnityPlayerActivity {

    private static BugseeUnityAdapter sInstance;
    static BugseeUnityAdapter getInstance() {
        if (sInstance == null) {
            synchronized (Bugsee.class) {
                if (sInstance == null) {
                    sInstance = new BugseeUnityAdapter();
                }
            }
        }
        return sInstance;
    }

    public BugseeUnityAdapter adapter = BugseeUnityAdapter.getInstance();
    public Bugsee bugsee = Bugsee.getInstance();

    public void launch(String appToken, String optionsJson) {
        // How to get app here
        HashMap<String, Object> options; // options from json string
        Bugsee.launch(app,appToken,options);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
}
