WebServiceImpl.java 975 Bytes
Newer Older
1 2 3 4
package com.ydl.component.service;

import android.app.Activity;
import android.content.Context;
5

6
import com.alibaba.android.arouter.facade.annotation.Route;
7
import com.tencent.smtt.sdk.WebView;
8
import com.ydl.component.service.web.WVClickAbstractListener;
9
import com.ydl.component.service.web.WebJavascriptHandler;
10 11 12
import com.ydl.webview.IJavascriptHandler;
import com.ydl.webview.IWebService;
import com.ydl.webview.TellData;
13

14
import org.jetbrains.annotations.NotNull;
15
import org.jetbrains.annotations.Nullable;
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

/**
 * Created by haorui on 2019-10-10.
 * Des:
 */
@Route(path = "/web/webservice")
public class WebServiceImpl implements IWebService {

    @Override
    public void init(Context context) {

    }

    @NotNull
    @Override
31 32
    public IJavascriptHandler getJavascripHandler(@NotNull Activity activity, @Nullable WebView webView, @NotNull TellData tellData) {
        return new WebJavascriptHandler(webView, new WVClickAbstractListener(activity));
33 34
    }
}