package com.example.andy.myapplication;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;

import org.json.JSONObject;

import java.util.Arrays;


public class singleTonExample {
    private Context appContext;
    private Dialog dialog;
    JSONObject i1;
    private static singleTonExample ourInstance = new singleTonExample();
    public void init(Context context){
        if(appContext == null){
            this.appContext = context;
        }
    }

    private Context getContext(){
        return appContext;
    }

    public static Context get(){
        return getInstance().getContext();
    }
    public static synchronized singleTonExample getInstance() {

        return ourInstance;
    }

    private singleTonExample() {
    }


    public void clearInstance() {
        ourInstance =null;
    }
}
