Skip to content

Commit

Permalink
Merge pull request #933 from LcTerry/master
Browse files Browse the repository at this point in the history
更新JPush 520
  • Loading branch information
LcTerry committed Sep 21, 2023
2 parents 66fd0ce + b12deec commit 6caa607
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.facebook.react:react-native:+'
implementation 'com.facebook.react:react-native:0.63.0'
}
Binary file not shown.
4 changes: 2 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
<category android:name="${applicationId}" />
</intent-filter>
</activity>
<receiver
<service
android:name=".receiver.JPushModuleReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
</service>

<receiver
android:name=".receiver.JPushBroadcastReceiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import cn.jpush.android.api.CustomMessage;
import cn.jpush.android.api.JPushMessage;
import cn.jpush.android.api.NotificationMessage;
import cn.jpush.android.service.JPushMessageReceiver;
import cn.jpush.android.service.JPushMessageService;

public class JPushModuleReceiver extends JPushMessageReceiver {
public class JPushModuleReceiver extends JPushMessageService {

@Override
public void onMessage(Context context, CustomMessage customMessage) {
Expand Down
11 changes: 6 additions & 5 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ android {
}

defaultConfig {
applicationId "com.jmessage.sdk" //在此替换你的applicationId
applicationId "com.HuananThirdPush.cn" //在此替换你的applicationId
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionCode 9999
versionName "9999.0"
manifestPlaceholders = [
JPUSH_APPKEY: "129c21dc4cb5e6f6de194003", //在此替换你的APPKey
JPUSH_APPKEY: "eb67142502ec9f5556875b9a", //在此替换你的APPKey
JPUSH_CHANNEL: "default" //在此替换你的channel
]
}
Expand Down Expand Up @@ -70,7 +70,8 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.react:react-native:0.63.0'

implementation project(':jpush-react-native') // 添加 jpush 依赖
implementation project(':jcore-react-native') // 添加 jcore 依赖

Expand Down
11 changes: 11 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ allprojects {

}
}
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

allprojects {
configurations.all {
resolutionStrategy {
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}

}

0 comments on commit 6caa607

Please sign in to comment.