forked from github/jpush-phonegap-plugin
更新JPush版本为v4.8.5
This commit is contained in:
parent
00599ca0bc
commit
abb4b6432b
@ -261,3 +261,36 @@ window.JPush.setBadgeNumber(badgeNumb)
|
|||||||
#### 参数说明
|
#### 参数说明
|
||||||
|
|
||||||
- badgeNumb: 角标显示数字,小于或等0,角标显示数字清楚
|
- badgeNumb: 角标显示数字,小于或等0,角标显示数字清楚
|
||||||
|
|
||||||
|
### API - setAuth
|
||||||
|
|
||||||
|
设置用户是否同意隐私协议
|
||||||
|
|
||||||
|
#### 接口定义
|
||||||
|
|
||||||
|
```js
|
||||||
|
window.JPush.setAuth(isAuth)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 参数说明
|
||||||
|
|
||||||
|
- isAuth: 是否同意隐私协议,true 已同意;false未同意
|
||||||
|
|
||||||
|
#### 调用逻辑
|
||||||
|
|
||||||
|
- 宿主 APP 在首次安装,冷启动
|
||||||
|
- 用户隐私协议告知
|
||||||
|
- 用户确认授权
|
||||||
|
- 告知极光授权结果
|
||||||
|
|
||||||
|
同意隐私协议:
|
||||||
|
|
||||||
|
```js
|
||||||
|
window.JPush.setAuth(true)
|
||||||
|
```
|
||||||
|
|
||||||
|
不同意隐私协议:
|
||||||
|
|
||||||
|
```js
|
||||||
|
window.JPush.setAuth(false)
|
||||||
|
```
|
BIN
example/css/.DS_Store
vendored
BIN
example/css/.DS_Store
vendored
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jpush-phonegap-plugin",
|
"name": "jpush-phonegap-plugin",
|
||||||
"version": "3.8.6",
|
"version": "4.8.5",
|
||||||
"description": "JPush for cordova plugin",
|
"description": "JPush for cordova plugin",
|
||||||
"cordova": {
|
"cordova": {
|
||||||
"id": "jpush-phonegap-plugin",
|
"id": "jpush-phonegap-plugin",
|
||||||
|
Binary file not shown.
@ -482,6 +482,7 @@ JPushPlugin.prototype.setBadgeNumber = function(badgeNumb) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//设备是否同意隐私协议
|
||||||
JPushPlugin.prototype.setAuth = function(isAuth){
|
JPushPlugin.prototype.setAuth = function(isAuth){
|
||||||
if(device.platform === "Android"){
|
if(device.platform === "Android"){
|
||||||
this.callNative("setAuth", [isAuth], null);
|
this.callNative("setAuth", [isAuth], null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user