Skip to content

Commit

Permalink
android 更新到 3.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
weiry committed Jul 29, 2019
1 parent ee3e6b9 commit b5fd5aa
Show file tree
Hide file tree
Showing 14 changed files with 360 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.gitignore.io/api/macos,apachecordova

.idea
### ApacheCordova ###
# Apache Cordova generated files and directories
bin/*
Expand Down
30 changes: 15 additions & 15 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JPush Phonegap Simple Demo</title>
Expand All @@ -18,15 +18,15 @@

initiateUI();
};

var getRegistrationID = function() {
window.JPush.getRegistrationID(onGetRegistrationID);
};

var onGetRegistrationID = function(data) {
try {
console.log("JPushPlugin:registrationID is " + data);

if (data.length == 0) {
var t1 = window.setTimeout(getRegistrationID, 1000);
}
Expand All @@ -36,7 +36,7 @@
console.log(exception);
}
};

var onTagsWithAlias = function(event) {
try {
console.log("onTagsWithAlias");
Expand All @@ -48,7 +48,7 @@
console.log(exception)
}
};

var onOpenNotification = function(event) {
try {
var alertContent;
Expand All @@ -62,7 +62,7 @@
console.log("JPushPlugin:onOpenNotification" + exception);
}
};

var onReceiveNotification = function(event) {
try {
var alertContent;
Expand All @@ -76,7 +76,7 @@
console.log(exception)
}
};

var onReceiveMessage = function(event) {
try {
var message;
Expand All @@ -90,7 +90,7 @@
console.log("JPushPlugin:onReceiveMessage-->" + exception);
}
};

var initiateUI = function() {
try {
window.JPush.init();
Expand All @@ -110,7 +110,7 @@
var tag2 = $("#tagText2").val()
var tag3 = $("#tagText3").val()
var tags = []

if (tag1) {
tags.push(tag1)
}
Expand All @@ -123,7 +123,7 @@

window.JPush.setTags({ sequence: 1, tags: tags },
function (result) {
$("#tagsResult").html(result.tags)
$("#tagsResult").html(JSON.stringify(result.tags))
}, function (error) {
alert(error.code)
})
Expand All @@ -135,7 +135,7 @@
$("#getAllTags").click(function (event) {
window.JPush.getAllTags({ sequence: 2 },
function (result) {
$("#tagsResult").html(result.tags)
$("#tagsResult").html(JSON.stringify(result.tags))
}, function (error) {
alert(error.code)
})
Expand Down Expand Up @@ -179,14 +179,14 @@
})
});
};

document.addEventListener("deviceready", onDeviceReady, false);
document.addEventListener("jpush.openNotification", onOpenNotification, false);
document.addEventListener("jpush.receiveNotification", onReceiveNotification, false);
document.addEventListener("jpush.receiveMessage", onReceiveMessage, false);
</script>
</head>

<body>
<div data-role="page" id="page">
<div data-role="content">
Expand Down Expand Up @@ -235,7 +235,7 @@ <h3>JPushPlugin Example</h3>
<input type="button" id="getAllTags" value="Get all tags" />
<input type="button" id="cleanTags" value="Clean tags" />
</div>

<div data-role="fieldcontain">
<input type="button" id="setAlias" value="Set alias" />
<input type="button" id="getAlias" value="Get alias" />
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.6.4",
"version": "3.7.0",
"description": "JPush for cordova plugin",
"cordova": {
"id": "jpush-phonegap-plugin",
Expand All @@ -23,7 +23,7 @@
],
"devDependencies": {
"cordova-plugin-device": "*",
"cordova-plugin-jcore": ">=1.2.8"
"cordova-plugin-jcore": ">=1.3.0"
},
"author": "JiGuang",
"license": "MIT",
Expand Down
Loading

0 comments on commit b5fd5aa

Please sign in to comment.