xamarin / GooglePlayServicesComponents

Other
313 stars 145 forks source link

Core library: IInstallStateUpdatedListener missing new Android 14 requirements? #813

Open DM-98 opened 8 months ago

DM-98 commented 8 months ago

Xamarin.Android Version (eg: 6.0):

14.0

Operating System & Version (eg: Mac OSX 10.11):

Pixel 5 - API 34 (Android 14.0)

Describe your Issue

I have a simple flexible In-App update for my Android app, and then... After upgrading my simulator, and using the new Pixel 5 - Android 14 (API 34) simulator, I now get exception:

Java.Lang.SecurityException: 'com.companyname.landbrugnet.estate.maui: 
One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts'

Relevant information

Packages used (newest version of Google Play Core):

<PackageReference Include="Xamarin.Google.Android.Play.Core">
    <Version>1.10.3.7</Version>
</PackageReference>

Info: I have tried using the specific App Update nuget package, and I get same exception as this issue: https://github.com/PatGet/XamarinPlayCoreUpdater/issues/17 Which is:

error: AppUpdateInstallListener is not abstract and does not override abstract method onStateUpdate(InstallState) in StateUpdatedListener

error: name clash: onStateUpdate(Object) in AppUpdateInstallListener and onStateUpdate(StateT) in StateUpdatedListener have the same erasure, yet neither overrides the other public void onStateUpdate (java.lang.Object p0) where StateT is a type-variable: StateT extends Object declared in interface StateUpdatedListener
HavenDV commented 5 months ago

Maybe this package will help you: https://github.com/oscoreio/Maui.Android.InAppUpdates

pulmuone commented 5 months ago

same issue

java.lang.SecurityException: com.gwise.visioninventory: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts

Exception java.lang.SecurityException: com.gwise.visioninventory: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
  at android.os.Parcel.createExceptionOrNull (Parcel.java:3057)
  at android.os.Parcel.createException (Parcel.java:3041)
  at android.os.Parcel.readException (Parcel.java:3024)
  at android.os.Parcel.readException (Parcel.java:2966)
  at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature (IActivityManager.java:5684)
  at android.app.ContextImpl.registerReceiverInternal (ContextImpl.java:1852)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1792)
  at android.app.ContextImpl.registerReceiver (ContextImpl.java:1780)
  at android.content.ContextWrapper.registerReceiver (ContextWrapper.java:755)
  at com.google.android.play.core.listener.zzc.zzb (com.google.android.play:core@@1.10.3:3)
  at com.google.android.play.core.listener.zzc.zzf (com.google.android.play:core@@1.10.3:4)
  at com.google.android.play.core.appupdate.zzf.registerListener (com.google.android.play:core@@1.10.3:1)
  at crc643832a0f6fcbae3f9.MainActivity.n_onStart
  at crc643832a0f6fcbae3f9.MainActivity.onStart (MainActivity.java:59)
  at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1582)
  at android.app.Activity.performStart (Activity.java:8628)
  at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3807)
  at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:225)
  at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:205)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:177)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2443)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:205)
  at android.os.Looper.loop (Looper.java:294)
  at android.app.ActivityThread.main (ActivityThread.java:8177)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.am.ActivityManagerService.registerReceiverWithFeature (ActivityManagerService.java:13908)
  at android.app.IActivityManager$Stub.onTransact (IActivityManager.java:2570)
  at com.android.server.am.ActivityManagerService.onTransact (ActivityManagerService.java:2720)
  at android.os.Binder.execTransactInternal (Binder.java:1339)
  at android.os.Binder.execTransact (Binder.java:1275)
pulmuone commented 5 months ago

nuget change : Xamarin.Google.Android.Play.App.Update

You should use the immediate update.