本文整理汇总了Java中org.apache.cordova.CordovaArgs.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java CordovaArgs.getBoolean方法的具体用法?Java CordovaArgs.getBoolean怎么用?Java CordovaArgs.getBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cordova.CordovaArgs
的用法示例。
在下文中一共展示了CordovaArgs.getBoolean方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPaused
import org.apache.cordova.CordovaArgs; //导入方法依赖的package包/类
private void setPaused(CordovaArgs args, final CallbackContext callbackContext)
throws JSONException {
int socketId = args.getInt(0);
boolean paused = args.getBoolean(1);
TcpServerSocket socket = sockets.get(Integer.valueOf(socketId));
if (socket == null) {
Log.e(LOG_TAG, "No socket with socketId " + socketId);
return;
}
socket.setPaused(paused);
if (paused) {
// Accept interest will be removed when socket is acceptable on selector thread.
callbackContext.success();
} else {
// All interests need to be modified in selector thread.
addSelectorMessage(socket, SelectorMessageType.SO_ADD_ACCEPT_INTEREST, callbackContext);
}
}
开发者ID:MobileChromeApps,项目名称:cordova-plugin-chrome-apps-sockets-tcpServer,代码行数:23,代码来源:ChromeSocketsTcpServer.java
示例2: setPaused
import org.apache.cordova.CordovaArgs; //导入方法依赖的package包/类
private void setPaused(CordovaArgs args, final CallbackContext callbackContext)
throws JSONException {
int socketId = args.getInt(0);
boolean paused = args.getBoolean(1);
ChromeBluetoothSocketSocket socket = sockets.get(socketId);
if (socket == null) {
callbackContext.error("Invalid Argument");
return;
}
socket.setPaused(paused);
callbackContext.success();
}
开发者ID:MobileChromeApps,项目名称:cordova-plugin-chrome-apps-bluetoothSocket,代码行数:17,代码来源:ChromeBluetoothSocket.java