Skip to content

Commit

Permalink
Merge pull request #59 from LcTerry/master
Browse files Browse the repository at this point in the history
更新Android Jpush 4.8.1+JCore 3.3.4
  • Loading branch information
LcTerry authored Sep 20, 2022
2 parents eecb768 + f641579 commit 01cdefa
Show file tree
Hide file tree
Showing 23 changed files with 213 additions and 47 deletions.
26 changes: 15 additions & 11 deletions PLuginsAndroidAARCode/jpush-unity-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
mavenCentral()
maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'}

}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:4.0.0'

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

android {
compileSdkVersion 25
buildToolsVersion "27.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.0"

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
Expand All @@ -32,10 +34,12 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public void setDebug(boolean enable) {
public void initPush(String gameObject) {
JPushBridge.gameObject = gameObject;
mContext = UnityPlayer.currentActivity.getApplicationContext();
JPushInterface.setNotificationCallBackEnable(mContext,true);
JPushInterface.init(mContext);

if (!receiveNotiStrCache.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public void onNotifyMessageArrived(Context context, NotificationMessage notifica
public void onNotifyMessageOpened(Context context, NotificationMessage notificationMessage) {
JPushInterface.reportNotificationOpened(context, notificationMessage.msgId);//bundle.getString(JPushInterface.EXTRA_MSG_ID)

Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
if (launch != null) {
launch.addCategory(Intent.CATEGORY_LAUNCHER);
launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(launch);
}
// Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
// if (launch != null) {
// launch.addCategory(Intent.CATEGORY_LAUNCHER);
// launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
// context.startActivity(launch);
// }

String title = notificationMessage.notificationTitle;//bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
String content = notificationMessage.notificationContent;//bundle.getString(JPushInterface.EXTRA_ALERT);
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=" "
Expand All @@ -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>
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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>
Loading

0 comments on commit 01cdefa

Please sign in to comment.