Maui.Android.InAppUpdates icon indicating copy to clipboard operation
Maui.Android.InAppUpdates copied to clipboard

Flexible Update Support

Open ysmoradi opened this issue 1 year ago • 15 comments

At the moment, we're using awesome Maui.AppStoreInfo in our project template I tried to use Maui.Android.InAppUpdates, but I received exception related to exportable activities, but before trying to fix that issue, I'd like to know about porting to Xamarin.Google.Android.Play.App.Update's schedule. Congrats on your awesome works! I really appreciate them (":

ysmoradi avatar Feb 23 '24 10:02 ysmoradi

Thanks for your feedback. We tried using Xamarin.Google.Android.Play.App.Update already, but we had some problems with flexible updates, which is why we switched back to the Core package. I think we should give this another chance, the transition itself is quite trivial.

HavenDV avatar Feb 23 '24 10:02 HavenDV

Xamarin.Google.Android.Play.App.Update v2.1.0.5 gives this error when trying to build the final application. The library is built without errors

0>InstallStateUpdatedListener.java(4,8): Error JAVAC0000 javac:  error: InstallStateUpdatedListener is not abstract and does not override abstract method onStateUpdate(InstallState) in StateUpdatedListener
public class InstallStateUpdatedListener

0>InstallStateUpdatedListener.java(30,14): Error JAVAC0000 javac:  error: name clash: onStateUpdate(Object) in InstallStateUpdatedListener and onStateUpdate(InstallState) in StateUpdatedListener have the same erasure, yet neither overrides the other
	public void onStateUpdate (java.lang.Object p0)

Information:

  • https://github.com/PatGet/XamarinPlayCoreUpdater/issues/17
  • https://github.com/PatGet/XamarinPlayCoreUpdater/pull/20

HavenDV avatar Feb 23 '24 13:02 HavenDV

So for now the planned solution to this issue is to just wait for the new version of Xamarin.Google.Android.Play.App.Update to be released and try again But perhaps there are other possibilities to implement or bypass this and we will be grateful for any information

HavenDV avatar Feb 23 '24 13:02 HavenDV

Since support for Android 14 is important to us and the current version has bugs with this(https://github.com/xamarin/GooglePlayServicesComponents/issues/813), we still made the transition and released version 1.1.0. But flexible updates are still not supported

HavenDV avatar Mar 07 '24 22:03 HavenDV

It seems it's not compatible with popular Plugin.StoreReview nuget package, even the recently published beta version )": As far as I was able to understand, this is mainly an issue of Plugin.StoreReview, not Maui.Android.InAppUpdates, but I think if you submit an issue to that repo, you can describe the situation much much better than me.

Error	XA4215	The Java type `com.google.android.play.core.install.InstallStateUpdatedListener` is generated by more than one managed type. Please change the [Register] attribute so that the same Java type is not emitted.	Boilerplate.Client.Maui	C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets	1513	

ysmoradi avatar Mar 09 '24 08:03 ysmoradi

I think the main problem is that the packages using Xamarin.Google.Android.Play.Core are not compatible with the Xamarin.Google.Android.Play.App.Update packages and other modular packages. But I could be wrong here

HavenDV avatar Mar 09 '24 14:03 HavenDV

I think the main problem is that the packages using Xamarin.Google.Android.Play.Core are not compatible with the Xamarin.Google.Android.Play.App.Update packages and other modular packages. But I could be wrong here

Would you recommend posting issue there?

ysmoradi avatar Mar 09 '24 18:03 ysmoradi

I see recent commits in this repository and maybe it makes sense. Otherwise we may release a similar package for net8 and higher

HavenDV avatar Mar 09 '24 22:03 HavenDV

Or I can provide a PR with support for migrating to modular packages for that repository and we'll just use that. But this may have compatibility issues with previous versions

HavenDV avatar Mar 09 '24 22:03 HavenDV

I'm fine with either approaches If you decided to send a PR, consider opening issue there first, so we can continue discussion there. Hope this helps me use your package in our project template finally 😅

ysmoradi avatar Mar 10 '24 02:03 ysmoradi

https://github.com/oscoreio/Maui.InAppReviews I've already released an initial version of this package, but I haven't tested it enough yet. But any feedback if you have time to test this would help me

HavenDV avatar Mar 12 '24 22:03 HavenDV

Greeting! It's working. The only remaining issue is support for flexible updates.

ysmoradi avatar Mar 30 '24 04:03 ysmoradi

Version	Downloads	Last updated	
[2.1.0.6](https://www.nuget.org/packages/Xamarin.Google.Android.Play.App.Update.Ktx/2.1.0.6)	40	2 days ago

I hope this update that came out two days ago will solve the problem

HavenDV avatar Mar 30 '24 11:03 HavenDV

Any updates on this? 😭

ysmoradi avatar May 03 '24 09:05 ysmoradi

This new version of the package still gives the same error, so unfortunately no The only way I see is to take the source code of this package and fix it, but I'm not quite sure where this source code is, whether it's open source, I didn't find it in their repository

HavenDV avatar May 03 '24 13:05 HavenDV

This seems to have been fixed with the update to net 9

HavenDV avatar Dec 05 '24 00:12 HavenDV

Thanks! Flexible update is now working, but why it doesn't download the new version in background? image

ysmoradi avatar Dec 29 '24 12:12 ysmoradi