Update getConnectionState API

This commit is contained in:
JoshLi 2018-10-18 14:26:00 +08:00
parent ff735854ec
commit 6f78522cca

View File

@ -523,7 +523,11 @@ public class JPushPlugin extends CordovaPlugin {
void getConnectionState(JSONArray data, CallbackContext callback) {
boolean isConnected = JPushInterface.getConnectionState(cordovaActivity.getApplicationContext());
callback.success(String.valueOf(isConnected));
if (isConnected) {
callback.success(1);
} else {
callback.success(0);
}
}
/**