package com.bxzk.afxj.View.Holder.webview;

import android.app.Activity;
import android.content.Context;
import android.webkit.JavascriptInterface;

public  class JSAndroid extends  Object {
    private Context context;
    public JSAndroid(Context context) {
        this.context=context;
    }
    private ConfigerManagner configerManagner;
    @JavascriptInterface
    public void openAndroid(String msg){
        Activity activity = (Activity) context;
        activity.finish();
    }

    @JavascriptInterface
    public void writeData(String msg) {
        configerManagner=ConfigerManagner.getInstance(context);
        configerManagner.setString("js",msg);
    }
    @JavascriptInterface
    public String giveInformation(String msg){
        configerManagner=ConfigerManagner.getInstance(context);
        String msg1= configerManagner.getString("js");
        return msg1;
    }


}