update android sdk to 2.1.3

This commit is contained in:
Hevin 2016-04-08 18:01:27 +08:00
parent a1cef0866c
commit 1ff72e4df4
14 changed files with 94 additions and 117 deletions

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Phonegap Sample App</title>
<title>JPush Phonegap Simple Demo</title>
<link href="css/jquery.mobile-1.1.1.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.1.js"></script>
@ -20,15 +20,13 @@
var onGetRegistradionID = function(data) {
try {
console.log("JPushPlugin:registrationID is " + data);
if (data.length == 0) {
var t1 = window.setTimeout(getRegistrationID, 1000);
}
$("#registrationid").html(data);
}
catch (exception) {
} catch (exception) {
console.log(exception);
}
};
@ -40,11 +38,11 @@
result += "tags:" + event.tags + " ";
result += "alias:" + event.alias + " ";
$("#tagAliasResult").html(result);
}
catch (exception) {
} catch (exception) {
console.log(exception)
}
};
var onOpenNotification = function(event) {
try {
var alertContent;
@ -54,12 +52,11 @@
alertContent = event.aps.alert;
}
alert("open Notificaiton:" + alertContent);
}
catch (exception) {
} catch (exception) {
console.log("JPushPlugin:onOpenNotification" + exception);
}
};
var onReceiveNotification = function(event) {
try {
var alertContent;
@ -70,26 +67,21 @@
}
$("#notificationResult").html(alertContent);
}
catch (exeption) {
} catch (exeption) {
console.log(exception)
}
};
var onReceiveMessage = function(event) {
try {
var message;
if (device.platform == "Android") {
message = window.plugins.jPushPlugin.receiveMessage.message;
} else {
message = event.content;
}
//var extras = window.plugins.jPushPlugin.extras
$("#messageResult").html(message);
}
catch (exception) {
} catch (exception) {
console.log("JPushPlugin:onReceiveMessage-->" + exception);
}
};
@ -106,16 +98,10 @@
window.plugins.jPushPlugin.setDebugMode(true);
window.plugins.jPushPlugin.setStatisticsOpen(true);
}
}
catch (exception) {
} catch (exception) {
console.log(exception);
}
$("#setTagWithAliasButton").click(function(ev) {
// window.plugins.jPushPlugin.getApplicationIconBadgeNumber(function(data){
// console.log(data);
// });
try {
var tag1 = $("#tagText1").attr("value");
var tag2 = $("#tagText2").attr("value");
@ -123,9 +109,6 @@
var alias = $("#aliasText").attr("value");
var dd = [];
if (tag1 == "" && tag2 == "" && tag3 == "") {
}
else {
if (tag1 != "") {
dd.push(tag1);
}
@ -135,34 +118,30 @@
if (tag3 != "") {
dd.push(tag3);
}
}
window.plugins.jPushPlugin.setTagsWithAlias(dd, alias);
}
catch (exception) {
} catch (exception) {
console.log(exception);
}
})
};
document.addEventListener("jpush.setTagsWithAlias", onTagsWithAlias, false);
document.addEventListener("deviceready", onDeviceReady, false);
document.addEventListener("jpush.openNotification", onOpenNotification, false);
document.addEventListener("jpush.receiveNotification", onReceiveNotification, false);
document.addEventListener("jpush.receiveMessage", onReceiveMessage, false);
//jpush.receiveMessage
</script>
</head>
<body>
<div data-role="page" id="page">
<div data-role="content">
<form>
<div class="ui-body ui-body-b">
<div data-role="fieldcontain">
<center><h3>JPushPlugin Example</h3></center>
<center>
<h3>JPushPlugin Example</h3>
</center>
<span name="alias" id="alias"></span>
<hr/>
<label>RegistrationID: </label>
@ -183,7 +162,7 @@
</tr>
<tr>
<td>
<input type="text" id="tagText3">
<input type="text" id="tagText3" />
</td>
</tr>
</table>
@ -191,7 +170,7 @@
<table>
<tr>
<td>
<input type="text" id="aliasText">
<input type="text" id="aliasText" />
</td>
</tr>
</table>
@ -200,7 +179,7 @@
<input type="button" id="setTagWithAliasButton" value="Add tag and alias" />
</div>
<div data-role="fieldcontain">
<label id="tagAliasPrompt">设置tag/alias结果 </label>
<label id="tagAliasPrompt">设置tag/alias结果:</label>
<label id="tagAliasResult">null</label>
</div>
<div data-role="fieldcontain">
@ -211,12 +190,10 @@
<label id="messagePrompt">接受的自定义消息:</label>
<label id="messageResult">null</label>
</div>
</div>
</form>
</div>
</div>
</body>
</html>

View File

@ -163,12 +163,12 @@
<meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
<meta-data android:name="JPUSH_APPKEY" android:value="$API_KEY"/>
</config-file>
<source-file src="src/android/jpush-android-2.1.0.jar" target-dir="libs"/>
<source-file src="src/android/armeabi/libjpush210.so" target-dir="libs/armeabi"/>
<source-file src="src/android/armeabi-v7a/libjpush210.so" target-dir="libs/armeabi-v7a"/>
<source-file src="src/android/arm64-v8a/libjpush210.so" target-dir="libs/arm64-v8a"/>
<source-file src="src/android/x86/libjpush210.so" target-dir="libs/x86"/>
<source-file src="src/android/x86_64/libjpush210.so" target-dir="libs/x86_64"/>
<source-file src="src/android/jpush-android-2.1.3.jar" target-dir="libs"/>
<source-file src="src/android/armeabi/libjpush213.so" target-dir="libs/armeabi"/>
<source-file src="src/android/armeabi-v7a/libjpush213.so" target-dir="libs/armeabi-v7a"/>
<source-file src="src/android/arm64-v8a/libjpush213.so" target-dir="libs/arm64-v8a"/>
<source-file src="src/android/x86/libjpush213.so" target-dir="libs/x86"/>
<source-file src="src/android/x86_64/libjpush213.so" target-dir="libs/x86_64"/>
<!--<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jpush/phonegap"/>-->
<source-file src="src/android/MyReceiver.java" target-dir="src/cn/jpush/phonegap"/>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.