xamarin / GooglePlayServicesComponents

Other
313 stars 145 forks source link

Add extension to Asset Delivery #842

Closed dellis1972 closed 3 months ago

dellis1972 commented 4 months ago

Google Play Services Version (eg: 8.4.0):

Does this change any of the generated binding API's?

yes

Describe your contribution

It adds the AssetPackStateUpdateListenerWrapper to the Xamarini.Google.Android.Play.Asset.Delivery nuget package to help users deal with ondemand asset packs. This class is also n the Xamarin.Google.Android.Play.Core package, but that package has been depricated and appears to have issues on API 34.

Remove the old AssetPackStateUpdateListenerWrapper from Xamarini.Google.Android.Play.Core as it will conflict with the one that will be in Xamarini.Google.Android.Play.Asset.Delivery. Do the same for the SplitInstallStateUpdateListenerWrapper this will now be in Xamarini.Google.Android.Play.Feature.Delivery.

Add a sample app called BuildAllPlayDotNet which will use the Asset Delivery API and the wrapper class to make sure it is compiled into the nuget package.

dellis1972 commented 4 months ago

@jpobst I thought the packages still support Classic XA? How long before we drop support for it?

jpobst commented 4 months ago

They do, I assume we will drop support shortly after the May 1st cutoff.

I guess the real question is: does this need to be fixed for Classic at all? I assume users can still use the Xamarin.Google.Android.Play.Core NuGet if they want? Classic doesn't support API-34.

dellis1972 commented 4 months ago

They do, I assume we will drop support shortly after the May 1st cutoff.

I guess the real question is: does this need to be fixed for Classic at all? I assume users can still use the Xamarin.Google.Android.Play.Core NuGet if they want? Classic doesn't support API-34.

In that case they probably don't. I can rework to see if AndroidJavaSource will work

dellis1972 commented 4 months ago

@jpobst

Not sure we can use AndroidJavaSource in this instance. The .jar files which we need to compile the Java source against as InputJar which are not passed to the _DetermineBindingJavaLibrariesToCompile target. So we end up with a compilatiion error. Now we could fix that, but its gonna be a while before it can filter into the components build system.

Maybe we can add this as a todo for later?

jpobst commented 4 months ago

That's unfortunate, we can fix that later.

I think we'll likely be using this feature more now that it's available so it would definitely be nice to get it fixed.

jonpryor commented 3 months ago

Need to update https://github.com/xamarin/GooglePlayServicesComponents/blob/main/published-namespaces.txt in order for the builds to succeed, adding Xamarin.Google.Android.Play.Asset.Delivery.

dellis1972 commented 3 months ago

/azp run

azure-pipelines[bot] commented 3 months ago
Azure Pipelines failed to run 1 pipeline(s).
dellis1972 commented 3 months ago

@jpobst @moljac This is good to go now 👍

dellis1972 commented 3 months ago

@jpobst I put the removed code back. See https://github.com/xamarin/GooglePlayServicesComponents/pull/842#discussion_r1517446215 for details

dellis1972 commented 3 months ago

@jpobst shall I leave this for you to merge?