package com.ruiwenliu.wrapper.weight.webview;

import android.content.Context;
import android.webkit.JavascriptInterface;
import android.widget.Toast;



import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by Amuse
 * Data:2018/10/30 0030
 * Desc:原生与h5交互测试
 */

public class NativeInterface {
    private Context mContext;

    public NativeInterface(Context context) {
        mContext = context;
    }

    @JavascriptInterface
    public void hello() {
        Toast.makeText(mContext, "hello", Toast.LENGTH_SHORT).show();
    }

    @JavascriptInterface
    public void hello(String params) {
        Toast.makeText(mContext, params, Toast.LENGTH_SHORT).show();
    }

    @JavascriptInterface
    public String getAndroid() {
        Toast.makeText(mContext, "getAndroid", Toast.LENGTH_SHORT).show();
        return "Android data";
    }

    @JavascriptInterface
    public String getAndroidTime() {
        return String.valueOf(System.currentTimeMillis());
    }

    @JavascriptInterface
    public void app(){

    }




}
