本文整理匯總了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