mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-19 22:55:02 +08:00
Merge branch 'dev'
This commit is contained in:
commit
3bf9dae294
@ -2,7 +2,7 @@
|
||||
|
||||
[![Build Status](https://travis-ci.org/jpush/jpush-phonegap-plugin.svg?branch=master)](https://travis-ci.org/jpush/jpush-phonegap-plugin)
|
||||
[![QQ Group](https://img.shields.io/badge/QQ%20Group-413602425-red.svg)]()
|
||||
[![release](https://img.shields.io/badge/release-3.1.7-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[![release](https://img.shields.io/badge/release-3.1.8-blue.svg)](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[![platforms](https://img.shields.io/badge/platforms-iOS%7CAndroid-lightgrey.svg)](https://github.com/jpush/jpush-phonegap-plugin)
|
||||
[![weibo](https://img.shields.io/badge/weibo-JPush-blue.svg)](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
|
||||
|
||||
@ -103,7 +103,7 @@ cordova platform update ios
|
||||
## Support
|
||||
- QQ 群:413602425
|
||||
- [JPush 官网文档](https://docs.jiguang.cn/jpush/guideline/intro/)
|
||||
<!-- - [极光社区](http://community.jiguang.cn/) -->
|
||||
- [极光社区](http://community.jiguang.cn/)
|
||||
|
||||
## Contribute
|
||||
Please contribute! [Look at the issues](https://github.com/jpush/jpush-phonegap-plugin/issues).
|
||||
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jpush-phonegap-plugin",
|
||||
"version": "3.1.7",
|
||||
"version": "3.1.8",
|
||||
"description": "JPush for cordova plugin",
|
||||
"cordova": {
|
||||
"id": "jpush-phonegap-plugin",
|
||||
@ -21,13 +21,9 @@
|
||||
"cordova-ios",
|
||||
"cordova-android"
|
||||
],
|
||||
"engines": [{
|
||||
"name": "cordova",
|
||||
"version": ">=3.0"
|
||||
}],
|
||||
"dependencies": {
|
||||
"devDependencies": {
|
||||
"cordova-plugin-device": "*",
|
||||
"cordova-plugin-jcore": "1.1.4"
|
||||
"cordova-plugin-jcore": "*"
|
||||
},
|
||||
"author": "JiGuang",
|
||||
"license": "MIT",
|
||||
|
@ -2,7 +2,7 @@
|
||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="jpush-phonegap-plugin"
|
||||
version="3.1.7">
|
||||
version="3.1.8">
|
||||
|
||||
<name>JPush</name>
|
||||
<description>JPush for cordova plugin</description>
|
||||
|
@ -458,6 +458,11 @@ public class JPushPlugin extends CordovaPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
void getConnectionState(JSONArray data, CallbackContext callback) {
|
||||
boolean isConnected = JPushInterface.getConnectionState(cordovaActivity.getApplicationContext());
|
||||
callback.success(String.valueOf(isConnected));
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义通知行为,声音、震动、呼吸灯等。
|
||||
*/
|
||||
|
@ -208,6 +208,12 @@ JPushPlugin.prototype.addNotificationActions = function (actions, categoryId) {
|
||||
}
|
||||
|
||||
// Android methods
|
||||
JPushPlugin.prototype.getConnectionState = function (successCallback) {
|
||||
if (device.platform === 'Android') {
|
||||
this.callNative('getConnectionState', [], successCallback)
|
||||
}
|
||||
}
|
||||
|
||||
JPushPlugin.prototype.setBasicPushNotificationBuilder = function () {
|
||||
if (device.platform === 'Android') {
|
||||
this.callNative('setBasicPushNotificationBuilder', [], null)
|
||||
|
Loading…
Reference in New Issue
Block a user