本文整理汇总了Java中org.xwalk.core.JavascriptInterface类的典型用法代码示例。如果您正苦于以下问题:Java JavascriptInterface类的具体用法?Java JavascriptInterface怎么用?Java JavascriptInterface使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JavascriptInterface类属于org.xwalk.core包,在下文中一共展示了JavascriptInterface类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: webAppLoaded
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void webAppLoaded() {
webAppReady = true;
if (progress != null) {
progress.dismiss();
}
registerForGCM();
}
示例2: exec
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException {
if (Looper.myLooper() == null) {
Looper.prepare();
}
return bridge.jsExec(bridgeSecret, service, action, callbackId, arguments);
}
示例3: enter
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void enter(final String title, final String article) {
runOnUiThread(() -> {
readerModeInjected = true;
try {
enterReaderMode(title, article);
} catch (IOException e) {
Log.e(TAG, "console: failed entering reader mode", e);
}
});
}
示例4: unavailable
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void unavailable() {
runOnUiThread(() -> {
readerModeInjected = true;
toolbarSwitch.setVisibility(View.GONE);
});
}
示例5: postMessage
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void postMessage(String message) {
mContext.onMessage(message);
}
示例6: start
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void start() {
onStart();
}
示例7: prepare
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void prepare(boolean webgl, boolean webaudio, boolean showfps) {
onPrepare(webgl, webaudio, showfps);
}
示例8: setNativeToJsBridgeMode
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void setNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException {
bridge.jsSetNativeToJsBridgeMode(bridgeSecret, value);
}
示例9: retrieveJsMessages
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public String retrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException {
return bridge.jsRetrieveJsMessages(bridgeSecret, fromOnlineEvent);
}
示例10: openImage
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public void openImage(final String url) {
runOnUiThread(() -> openWebImage(url));
}
示例11: exec
import org.xwalk.core.JavascriptInterface; //导入依赖的package包/类
@JavascriptInterface
public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException {
return bridge.jsExec(bridgeSecret, service, action, callbackId, arguments);
}