kungfu-king-betty / cordova-plugin-native-app-update

This is a cordova plugin to easily check the iOS App Store or Android Google Play Store for an available app update.
MIT License
12 stars 17 forks source link

com.google.android.play:core:1.10.0 issues #11

Open BenLaKnet opened 4 months ago

BenLaKnet commented 4 months ago

When publishing a new version of app, we have an issue from Google like:

com.google.android.play:core has added this note for core:1.10.0:

Update your Play Core Maven dependency to an Android 14 compatible version! Your current Play Core library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers to improve user security. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest Play Core library version dependency to avoid app crashes: https://developer.android.com/guide/playcore#playcore-migration
afeurra commented 3 months ago

Hey thanks for this PR, I'm trying to make it work. Seems like there's still something odd cause in com.google.android.play:core:1.10.3 AppUpdateManager still uses com.google.android.play.core.tasks.Task. Am I doing something wrong?

/Users/andrea/Desktop/Projects/HUB/TCS-Hub-frontend/platforms/android/app/src/main/java/com/apache/cordova/appupdate/CDVAppUpdate.java:178: error: incompatible types: com.google.android.play.core.tasks.Task<AppUpdateInfo> cannot be converted to com.google.android.gms.tasks.Task<AppUpdateInfo>
        Task<AppUpdateInfo> appUpdateInfoTask = appUpdateManager.getAppUpdateInfo();
                                                                                 ^
BenLaKnet commented 3 months ago

Hi @afeurra, Have you changde only this 2 files or others ?

I just changed this twos file and all is running for me.

afeurra commented 3 months ago

Hi! I finally managed to make this work. I have a lot of other plugins that are not fully maintained (I know I should fix this...). I just needed to roll back to

        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

Plugin's working great now! Thank you!