mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-07 19:32:51 +08:00
Update getConnectionState API
This commit is contained in:
parent
ff735854ec
commit
6f78522cca
@ -523,7 +523,11 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
|
|
||||||
void getConnectionState(JSONArray data, CallbackContext callback) {
|
void getConnectionState(JSONArray data, CallbackContext callback) {
|
||||||
boolean isConnected = JPushInterface.getConnectionState(cordovaActivity.getApplicationContext());
|
boolean isConnected = JPushInterface.getConnectionState(cordovaActivity.getApplicationContext());
|
||||||
callback.success(String.valueOf(isConnected));
|
if (isConnected) {
|
||||||
|
callback.success(1);
|
||||||
|
} else {
|
||||||
|
callback.success(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user