本文整理匯總了Java中com.facebook.react.bridge.WebsocketJavaScriptExecutor類的典型用法代碼示例。如果您正苦於以下問題:Java WebsocketJavaScriptExecutor類的具體用法?Java WebsocketJavaScriptExecutor怎麽用?Java WebsocketJavaScriptExecutor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WebsocketJavaScriptExecutor類屬於com.facebook.react.bridge包,在下文中一共展示了WebsocketJavaScriptExecutor類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getExecutorConnectCallback
import com.facebook.react.bridge.WebsocketJavaScriptExecutor; //導入依賴的package包/類
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
final ProgressDialog progressDialog,
final SimpleSettableFuture<Boolean> future) {
return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
@Override
public void onSuccess() {
future.set(true);
progressDialog.dismiss();
}
@Override
public void onFailure(final Throwable cause) {
progressDialog.dismiss();
FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
future.setException(
new IOException(
mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
}
};
}