mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-03-03 13:22:52 +08:00
Merge branch 'dev'
This commit is contained in:
commit
f6ece7dd1e
@ -1,7 +1,7 @@
|
||||
# JPush PhoneGap / Cordova Plugin
|
||||
|
||||
[](https://travis-ci.org/jpush/jpush-phonegap-plugin)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin/releases)
|
||||
[](https://github.com/jpush/jpush-phonegap-plugin)
|
||||
[](http://weibo.com/jpush?refer_flag=1001030101_&is_all=1)
|
||||
|
||||
@ -72,14 +72,13 @@
|
||||
Android 因为各 Rom 的高度定制化,不像 iOS 一样能有一个统一的管理,如果在 Android 中想自定义通知铃声,推荐通过 JPush 推送自定义
|
||||
消息,之后在 `jpush.receiveMessage` 事件监听中通过 [Cordova Local-Notification Plugin](https://github.com/katzer/cordova-plugin-local-notifications) 触发通知,再配合 [Cordova Background Plugin](https://github.com/katzer/cordova-plugin-background-mode) 插件保证应用的后台运行。
|
||||
|
||||
#### 如果让通知内容像 iOS 一样换行展示?
|
||||
#### 如何让通知内容像 iOS 一样自动换行展示?
|
||||
|
||||
[#267](https://github.com/jpush/jpush-phonegap-plugin/issues/267)
|
||||
|
||||
#### 关闭 App 后收不到通知
|
||||
|
||||
Android 的推送通过长连接的方式实现,只有在连接保持的情况下才能收到通知。而有的第三方 ROM 会限制一般应用服务的自启动,也就是
|
||||
在退出应用后,应用的所有服务均被杀死,且无法自启动,所以就会收不到通知。
|
||||
Android 的推送通过长连接的方式实现,只有在保持连接的情况下才能收到通知。而有的第三方 ROM 会限制一般应用服务的自启动,也就是在退出应用后,应用的所有服务均被杀死,且无法自启动,所以就会收不到通知。
|
||||
|
||||
目前 JPush 是做了应用互相拉起机制的,也就是当用户打开其他集成了 JPush 的应用时,你的应用也能同时收到推送消息。
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
<script type="text/javascript" src="js/jquery.mobile-1.1.1.js"></script>
|
||||
<script type="text/javascript" src="cordova.js"></script>
|
||||
<script type="text/javascript">
|
||||
var onDeviceReady = function() {
|
||||
|
||||
var onDeviceReady = function() {
|
||||
document.addEventListener("jpush.receiveRegistrationId", function (event) {
|
||||
alert("receiveRegistrationId" + JSON.stringify(event));
|
||||
$("#registrationId").html(event.registrationId);
|
||||
@ -94,13 +94,11 @@
|
||||
var initiateUI = function() {
|
||||
try {
|
||||
window.JPush.init();
|
||||
window.JPush.setDebugMode(true);
|
||||
window.setTimeout(getRegistrationID, 1000);
|
||||
|
||||
if (device.platform != "Android") {
|
||||
window.JPush.setDebugModeFromIos();
|
||||
window.JPush.setApplicationIconBadgeNumber(0);
|
||||
} else {
|
||||
window.JPush.setDebugMode(true);
|
||||
window.JPush.setStatisticsOpen(true);
|
||||
}
|
||||
} catch (exception) {
|
||||
console.log(exception);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jpush-phonegap-plugin",
|
||||
"version": "3.2.12",
|
||||
"version": "3.2.13",
|
||||
"description": "JPush for cordova plugin",
|
||||
"cordova": {
|
||||
"id": "jpush-phonegap-plugin",
|
||||
|
@ -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.2.12">
|
||||
version="3.2.13">
|
||||
|
||||
<name>JPush</name>
|
||||
<description>JPush for cordova plugin</description>
|
||||
@ -207,7 +207,7 @@
|
||||
<meta-data android:name="JPUSH_APPKEY" android:value="$APP_KEY" />
|
||||
</config-file>
|
||||
|
||||
<source-file src="src/android/libs/jpush-android-3.0.9.jar" target-dir="libs" />
|
||||
<source-file src="src/android/libs/jpush-android-3.1.0.jar" target-dir="libs" />
|
||||
|
||||
<source-file src="src/android/MyReceiver.java" target-dir="src/cn/jiguang/cordova/push" />
|
||||
<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />
|
||||
|
Binary file not shown.
BIN
src/android/libs/jpush-android-3.1.0.jar
Executable file
BIN
src/android/libs/jpush-android-3.1.0.jar
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user