Skip to content

Commit 01cdefa

Browse files
authored
Merge pull request #59 from LcTerry/master
更新Android Jpush 4.8.1+JCore 3.3.4
2 parents eecb768 + f641579 commit 01cdefa

23 files changed

+213
-47
lines changed

PLuginsAndroidAARCode/jpush-unity-plugin/build.gradle

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
buildscript {
22
repositories {
3-
jcenter()
4-
maven {
5-
url 'https://maven.google.com/'
6-
name 'Google'
7-
}
3+
google()
4+
maven { url 'https://maven.aliyun.com/repository/google' }
5+
maven { url 'https://maven.aliyun.com/repository/jcenter' }
6+
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
7+
mavenCentral()
8+
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
9+
810
}
911
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.1'
12+
classpath 'com.android.tools.build:gradle:4.0.0'
1113

1214
// NOTE: Do not place your application dependencies here; they belong
1315
// in the individual module build.gradle files
@@ -17,12 +19,12 @@ buildscript {
1719
apply plugin: 'com.android.library'
1820

1921
android {
20-
compileSdkVersion 25
21-
buildToolsVersion "27.0.3"
22+
compileSdkVersion 30
23+
buildToolsVersion "30.0.0"
2224

2325
defaultConfig {
2426
minSdkVersion 14
25-
targetSdkVersion 25
27+
targetSdkVersion 30
2628
versionCode 1
2729
versionName "1.0"
2830
}
@@ -32,10 +34,12 @@ android {
3234
}
3335
}
3436
compileOptions {
35-
sourceCompatibility JavaVersion.VERSION_1_6
36-
targetCompatibility JavaVersion.VERSION_1_6
37+
sourceCompatibility JavaVersion.VERSION_1_8
38+
targetCompatibility JavaVersion.VERSION_1_8
3739
}
40+
3841
lintOptions {
42+
checkReleaseBuilds false
3943
abortOnError false
4044
}
4145
}

PLuginsAndroidAARCode/jpush-unity-plugin/gradle/wrapper/gradle-wrapper.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
7+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

PLuginsAndroidAARCode/jpush-unity-plugin/src/main/java/cn/jiguang/unity/push/JPushBridge.java

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public void setDebug(boolean enable) {
4949
public void initPush(String gameObject) {
5050
JPushBridge.gameObject = gameObject;
5151
mContext = UnityPlayer.currentActivity.getApplicationContext();
52+
JPushInterface.setNotificationCallBackEnable(mContext,true);
5253
JPushInterface.init(mContext);
5354

5455
if (!receiveNotiStrCache.isEmpty()) {

PLuginsAndroidAARCode/jpush-unity-plugin/src/main/java/cn/jiguang/unity/push/JPushEventReceiver.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ public void onNotifyMessageArrived(Context context, NotificationMessage notifica
154154
public void onNotifyMessageOpened(Context context, NotificationMessage notificationMessage) {
155155
JPushInterface.reportNotificationOpened(context, notificationMessage.msgId);//bundle.getString(JPushInterface.EXTRA_MSG_ID)
156156

157-
Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
158-
if (launch != null) {
159-
launch.addCategory(Intent.CATEGORY_LAUNCHER);
160-
launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
161-
context.startActivity(launch);
162-
}
157+
// Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
158+
// if (launch != null) {
159+
// launch.addCategory(Intent.CATEGORY_LAUNCHER);
160+
// launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
161+
// context.startActivity(launch);
162+
// }
163163

164164
String title = notificationMessage.notificationTitle;//bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
165165
String content = notificationMessage.notificationContent;//bundle.getString(JPushInterface.EXTRA_ALERT);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle"
4+
>
5+
<corners android:radius="6dp" />
6+
<solid android:color="#0A9789" />
7+
<stroke android:color="#0A9789" android:width="1dp"/>
8+
</shape>

PLuginsAndroidAARCode/jpush-unity-plugin/src/main/res/layout/jpush_popwin_layout.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
style="@style/MyDialogStyle"
66
android:orientation="vertical"
77
android:layout_width="280dp"
8-
android:layout_height="250dp" >
8+
android:layout_height="380dp" >
99

1010
<WebView
1111
android:layout_width="match_parent"

PLuginsAndroidAARCode/jpush-unity-plugin/src/main/res/layout/jpush_webview_layout.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313

1414
<ImageButton
1515
android:id="@+id/imgRichpushBtnBack"
16-
android:layout_width="wrap_content"
16+
android:layout_width="25dp"
1717
android:layout_height="wrap_content"
1818
android:layout_centerVertical="true"
1919
android:layout_marginLeft="9dp"
20-
android:layout_marginRight="10dp"
20+
android:layout_marginRight="9dp"
21+
android:layout_marginTop="8dp"
22+
android:layout_marginBottom="8dp"
2123
android:background="@drawable/jpush_richpush_btn_selector" />
2224

2325
<ImageView
@@ -35,7 +37,7 @@
3537
android:layout_height="wrap_content"
3638
android:layout_centerVertical="true"
3739
android:layout_marginLeft="7dp"
38-
android:layout_marginRight="5dp"
40+
android:layout_marginRight="48dp"
3941
android:layout_toRightOf="@id/imgView"
4042
android:clickable="false"
4143
android:text=" "
@@ -50,10 +52,10 @@
5052
android:progress="0"
5153
android:progressDrawable="@drawable/jpush_richpush_progressbar"
5254
style="?android:attr/progressBarStyleHorizontal" />
53-
<WebView
55+
<!--<WebView
5456
android:layout_width="match_parent"
5557
android:layout_height="match_parent"
5658
android:id="@+id/fullWebView"
57-
android:background="#000000" />
59+
android:background="#000000" />-->
5860

5961
</cn.jpush.android.ui.FullScreenView>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/jad_root_view"
4+
android:layout_width="match_parent"
5+
android:layout_height="64dp"
6+
android:orientation="horizontal"
7+
android:padding="10dp">
8+
9+
<ImageView
10+
android:id="@+id/jad_icon"
11+
android:layout_width="44dp"
12+
android:layout_height="44dp"
13+
android:layout_gravity="center"
14+
android:layout_marginRight="18dp"
15+
android:layout_marginEnd="18dp"
16+
android:background="#0A9789"
17+
android:duplicateParentState="false"
18+
android:scaleType="center" />
19+
20+
<RelativeLayout
21+
android:layout_width="wrap_content"
22+
android:layout_height="wrap_content"
23+
android:layout_weight="1">
24+
25+
<TextView
26+
android:id="@+id/jad_desc"
27+
android:layout_width="fill_parent"
28+
android:layout_height="wrap_content"
29+
android:ellipsize="end"
30+
android:singleLine="true"
31+
android:textColor="#000000"
32+
android:textSize="14sp"/>
33+
34+
<LinearLayout
35+
android:id="@+id/jad_download_success"
36+
android:layout_width="match_parent"
37+
android:layout_height="wrap_content"
38+
android:layout_below="@+id/jad_desc"
39+
android:orientation="horizontal"
40+
android:visibility="gone">
41+
<TextView
42+
android:id="@+id/download_success_size"
43+
android:layout_width="wrap_content"
44+
android:layout_height="wrap_content"
45+
android:layout_marginRight="12dp"
46+
android:layout_marginEnd="12dp"
47+
android:ellipsize="end"
48+
android:gravity="start|center"
49+
android:singleLine="true"
50+
android:textColor="#000000"
51+
android:textSize="12sp"/>
52+
<TextView
53+
android:id="@+id/jad_download_success_status"
54+
android:layout_width="wrap_content"
55+
android:layout_height="wrap_content"
56+
android:ellipsize="end"
57+
android:gravity="start|center"
58+
android:singleLine="true"
59+
android:textColor="#000000"
60+
android:textSize="11sp"/>
61+
</LinearLayout>
62+
63+
<LinearLayout
64+
android:id="@+id/jad_download_text"
65+
android:layout_width="match_parent"
66+
android:layout_height="wrap_content"
67+
android:layout_below="@+id/jad_desc"
68+
android:orientation="horizontal"
69+
android:visibility="visible">
70+
71+
<TextView
72+
android:id="@+id/jad_download_size"
73+
android:layout_width="0dp"
74+
android:layout_height="wrap_content"
75+
android:layout_weight="3"
76+
android:ellipsize="end"
77+
android:gravity="start|center"
78+
android:maxLines="1"
79+
android:textColor="#000000"
80+
android:textSize="11sp"/>
81+
82+
<TextView
83+
android:id="@+id/jad_download_status"
84+
android:layout_width="0dp"
85+
android:layout_height="wrap_content"
86+
android:layout_weight="2"
87+
android:ellipsize="end"
88+
android:gravity="end|center"
89+
android:singleLine="true"
90+
android:textColor="#000000"
91+
android:textSize="11sp"/>
92+
</LinearLayout>
93+
</RelativeLayout>
94+
95+
<TextView
96+
android:id="@+id/jad_action"
97+
android:layout_width="55dp"
98+
android:layout_height="30dp"
99+
android:layout_gravity="end|center"
100+
android:layout_marginLeft="18dp"
101+
android:layout_marginStart="18dp"
102+
android:layout_weight="0"
103+
android:gravity="center"
104+
android:background="@drawable/jpush_btn_bg_green_playable"
105+
android:textColor="#FFFFFF"
106+
android:textSize="12sp"/>
107+
</LinearLayout>

PLuginsAndroidAARCode/jpush-unity-plugin/src/main/res/values/jpush_style.xml

+9
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@
1010
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
1111
<item name="android:backgroundDimEnabled">true</item>
1212
</style>
13+
<style name="JPushTheme">
14+
<item name="android:windowNoTitle">true</item>
15+
<item name="android:windowActionBar">false</item>
16+
<item name="android:windowFullscreen">true</item>
17+
<item name="android:windowContentOverlay">@null</item>
18+
<item name="android:textAllCaps">false</item>
19+
<item name="android:windowIsTranslucent">true</item>
20+
<item name="android:windowBackground">@android:color/transparent</item>
21+
</style>
1322
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<paths>
4+
<root-path name="jad_root_path" path="."/>
5+
<external-path name="jad_external_path" path="JAdDownload" />
6+
<external-files-path name="jad_external_files_path" path="JAdDownload" />
7+
<files-path name="jad_files_path" path="JAdDownload" />
8+
<cache-path name="jad_cache_path" path="JAdDownload" />
9+
</paths>
10+
</resources>

0 commit comments

Comments
 (0)