更新Jpush 472+版本号483

This commit is contained in:
Lcterry 2022-08-11 10:33:40 +08:00
parent 76d6c5ddb1
commit 4a711b3a93
11 changed files with 210 additions and 29 deletions

View File

@ -1,6 +1,6 @@
{
"name": "jpush-phonegap-plugin",
"version": "3.8.2",
"version": "3.8.3",
"description": "JPush for cordova plugin",
"cordova": {
"id": "jpush-phonegap-plugin",

View File

@ -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.8.2">
version="3.8.3">
<name>JPush</name>
<description>JPush for cordova plugin</description>
@ -49,7 +49,7 @@
<source-file src="src/ios/Plugins/AppDelegate+JPush.m" />
<header-file src="src/ios/lib/JPUSHService.h" />
<source-file src="src/ios/lib/jpush-ios-3.7.4.a" framework="true" />
<source-file src="src/ios/lib/jpush-ios-4.6.6.a" framework="true" />
<resource-file src="src/ios/JPushConfig.plist" />
<framework src="CFNetwork.framework" weak="true" />
@ -107,9 +107,11 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--华为角标-->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE"/>
<!-- vivo 角标 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application" mode="merge">
@ -117,9 +119,16 @@
<!-- Rich push 核心功能 since 2.0.6-->
<activity
android:name="cn.jpush.android.ui.PopWinActivity"
android:theme="@style/MyDialogStyle"
android:exported="false">
android:name="cn.jpush.android.ui.PopWinActivity"
android:exported="true"
android:theme="@style/MyDialogStyle" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="cn.jpush.android.ui.PopWinActivity" />
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</activity>
<!-- Required SDK核心功能-->
@ -140,7 +149,8 @@
<service
android:name="cn.jpush.android.service.PushService"
android:process=":pushcore"
android:exported="false">
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.REGISTER" />
<action android:name="cn.jpush.android.intent.REPORT" />
@ -187,7 +197,7 @@
<category android:name="$PACKAGE_NAME" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<!-- Optional -->
@ -215,18 +225,33 @@
</receiver>
<!--since 3.3.0 Required SDK核心功能-->
<activity
android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="android.intent.category.DEFAULT" /><!--Required SDK核心功能 since 4.2.2-->
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</activity>
<!-- since 3.3.0 Required SDK核心功能 -->
<activity
android:name="cn.jpush.android.service.JNotifyActivity"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@style/JPushTheme" >
<intent-filter>
<action android:name="cn.jpush.android.intent.JNotifyActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</activity>
<!-- since 4.6.0 Required SDK核心功能 -->
<activity
android:name="cn.android.service.JTransitActivity"
android:exported="true"
android:taskAffinity="jpush.custom"
android:theme="@style/JPushTheme" >
<intent-filter>
<action android:name="cn.android.service.JTransitActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</activity>
<!-- since 3.3.0 Required SDK 核心功能-->
<!-- 可配置android:process参数将PushService放在其他进程中 -->
@ -238,7 +263,20 @@
<action android:name="cn.jiguang.user.service.action" />
</intent-filter>
</service>
<!-- since 4.6.3 可选适配Anroid7.0及以上如果您的应用需要在Anroid7.0及以上环境运行 -->
<provider
android:name="cn.jiguang.union.ads.service.JAdFileProvider"
android:authorities="$PACKAGE_NAME.JAdFileProvider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/jpush_file_paths" />
<intent-filter>
<action android:name="cn.jpush.android.intent.FileProvider" />
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</provider>
<receiver
android:name="cn.jiguang.cordova.push.JPushReceiver"
@ -261,7 +299,7 @@
</config-file>
<lib-file src="src/android/libs/jpush-android-4.2.8.jar" />
<lib-file src="src/android/libs/jpush-android-4.7.2.jar" />
<source-file src="src/android/PushService.java" target-dir="src/cn/jiguang/cordova/push" />
<source-file src="src/android/JPushPlugin.java" target-dir="src/cn/jiguang/cordova/push" />
@ -283,6 +321,8 @@
target="res/drawable-hdpi/jpush_ic_action_close.png" />
<resource-file src="src/android/res/drawable-hdpi/jpush_ic_action_close2.png"
target="res/drawable-hdpi/jpush_ic_action_close2.png" />
<resource-file src="src/android/res/drawable-hdpi/jpush_btn_bg_green_playable.xml"
target="res/drawable-hdpi/jpush_btn_bg_green_playable.xml" />
<resource-file src="src/android/res/layout/jpush_popwin_layout.xml"
target="res/layout/jpush_popwin_layout.xml" />
@ -296,6 +336,8 @@
target="res/layout/push_notification_middle.xml" />
<resource-file src="src/android/res/layout/jpush_inapp_banner.xml"
target="res/layout/jpush_inapp_banner.xml" />
<resource-file src="src/android/res/layout/push_download_notification_layout.xml"
target="res/layout/push_download_notification_layout.xml" />
<resource-file src="src/android/res/layout-v21/push_notification.xml"
target="res/layout-v21/push_notification.xml" />
@ -311,5 +353,7 @@
<resource-file src="src/android/res/values-zh/jpush_string.xml"
target="res/values-zh/jpush_string.xml" />
<resource-file src="src/android/res/xml/jpush_file_paths.xml"
target="res/xml/jpush_file_paths.xml" />
</platform>
</plugin>

View File

@ -247,6 +247,7 @@ public class JPushPlugin extends CordovaPlugin {
}
void init(JSONArray data, CallbackContext callbackContext) {
JPushInterface.setNotificationCallBackEnable(mContext, true);
JPushInterface.init(mContext);
}

Binary file not shown.

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>
<corners android:radius="6dp" />
<solid android:color="#0A9789" />
<stroke android:color="#0A9789" android:width="1dp"/>
</shape>

View File

@ -5,7 +5,7 @@
style="@style/MyDialogStyle"
android:orientation="vertical"
android:layout_width="280dp"
android:layout_height="250dp" >
android:layout_height="380dp" >
<WebView
android:layout_width="match_parent"

View File

@ -13,11 +13,13 @@
<ImageButton
android:id="@+id/imgRichpushBtnBack"
android:layout_width="wrap_content"
android:layout_width="25dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="9dp"
android:layout_marginRight="10dp"
android:layout_marginRight="9dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/jpush_richpush_btn_selector" />
<ImageView
@ -35,7 +37,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="7dp"
android:layout_marginRight="5dp"
android:layout_marginRight="48dp"
android:layout_toRightOf="@id/imgView"
android:clickable="false"
android:text=" "
@ -50,10 +52,10 @@
android:progress="0"
android:progressDrawable="@drawable/jpush_richpush_progressbar"
style="?android:attr/progressBarStyleHorizontal" />
<WebView
<!--<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fullWebView"
android:background="#000000" />
android:background="#000000" />-->
</cn.jpush.android.ui.FullScreenView>

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/jad_root_view"
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/jad_icon"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="center"
android:layout_marginRight="18dp"
android:layout_marginEnd="18dp"
android:background="#0A9789"
android:duplicateParentState="false"
android:scaleType="center" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/jad_desc"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textColor="#000000"
android:textSize="14sp"/>
<LinearLayout
android:id="@+id/jad_download_success"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jad_desc"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/download_success_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:layout_marginEnd="12dp"
android:ellipsize="end"
android:gravity="start|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="12sp"/>
<TextView
android:id="@+id/jad_download_success_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="start|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="11sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/jad_download_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/jad_desc"
android:orientation="horizontal"
android:visibility="visible">
<TextView
android:id="@+id/jad_download_size"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:ellipsize="end"
android:gravity="start|center"
android:maxLines="1"
android:textColor="#000000"
android:textSize="11sp"/>
<TextView
android:id="@+id/jad_download_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:ellipsize="end"
android:gravity="end|center"
android:singleLine="true"
android:textColor="#000000"
android:textSize="11sp"/>
</LinearLayout>
</RelativeLayout>
<TextView
android:id="@+id/jad_action"
android:layout_width="55dp"
android:layout_height="30dp"
android:layout_gravity="end|center"
android:layout_marginLeft="18dp"
android:layout_marginStart="18dp"
android:layout_weight="0"
android:gravity="center"
android:background="@drawable/jpush_btn_bg_green_playable"
android:textColor="#FFFFFF"
android:textSize="12sp"/>
</LinearLayout>

View File

@ -10,4 +10,13 @@
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="JPushTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:textAllCaps">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
</resources>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<paths>
<root-path name="jad_root_path" path="."/>
<external-path name="jad_external_path" path="JAdDownload" />
<external-files-path name="jad_external_files_path" path="JAdDownload" />
<files-path name="jad_files_path" path="JAdDownload" />
<cache-path name="jad_cache_path" path="JAdDownload" />
</paths>
</resources>