Question: I have a .NET MAUI Project with a lot of assets (images) in the `Resources\Images` directory that shall be deployed to the Google Play Store. This means that the size of the generated aab package is way beyond the Google Play Store limit of 150MB.
(Message: `Your App Bundle contains the following configurations where the initial install would exceed the maximum size of 150 MB`...)

My current solution resizes the images to <= 150MB. I now saw that there is the possibility to generate separate files for the assets, which is called [Play Feature Delivery](https://developer.android.com/guide/playcore/feature-delivery).

From [this sample project](https://github.com/Mindinventory/Google-Play-Asset-Delivery-Sample) I get the following gradle file to create an install-time-package:

```
apply plugin: 'com.android.asset-pack'

assetPack {
    packName = "install_time_asset_pack" // Directory name for the asset pack
    dynamicDelivery {
        deliveryType = "install-time" // delivery mode
    }
}

```

My question is: Can this somehow be done with .NET MAUI? Is it possible to add some elements to the csproj-file to do this, just like for example for the keystore:

```
<PropertyGroup Condition="$(TargetFramework.Contains('-android')) and '$(Configuration)' == 'Release'">
    <AndroidKeyStore>True</AndroidKeyStore>
    <AndroidSigningKeyStore>..\myapp.keystore</AndroidSigningKeyStore>
    <AndroidSigningKeyAlias>key</AndroidSigningKeyAlias>
    <AndroidSigningKeyPass>SuperSecretPassword!</AndroidSigningKeyPass>
    <AndroidSigningStorePass></AndroidSigningStorePass>
</PropertyGroup>

```

The characteristic of the app and the users makes it impossible to load the images at runtime, e.g. via https.

Answer: 
**tl;dr** I did not find any Maui answer at this time.  

The best starting point looks like XamarinComponent/Android/GoogleAndroidVending.  

HOWEVER that wraps a java library, and appears to use gradle, so TBD what knowledge is required to be able to build this, then adapt it for Maui.

---

The corresponding `Xamarin.Forms` doc is [APK Expansion Files](https://learn.microsoft.com/en-us/xamarin/android/deploy-test/publishing/publishing-to-google-play/apk-expansion-files).

The `Xamarin.Forms` nuget source code and doc is at [github XamarinComponents/Android/GoogleAndroidVending](https://github.com/xamarin/XamarinComponents/tree/main/Android/GoogleAndroidVending).

---

There is a Nuget link there, but that won't work in `.Net Maui`.

Until there is a Maui Nuget, it will be necessary to download the source code, and modify it. (If anyone does this, would be good to upload back to github. TBD where.)

App Startup is a bit different in `.Net Maui`, I did not investigate what might need to change.

In addition, there might be references to `Xamarin` namespaces that should change to `Maui` equivalents.

IMPORTANT: This c# code is a wrapper for a java library from Google. The project includes `gradle` references. TBD what the requirements are to build this.
If your APK is getting over 150Mb then I suspect Google and Apple (if you're making an iOS app) will be expecting you to host the image data in the cloud and pull it to the device on an 'as needed' basis so you're not clogging your users' device storage up unnecessarily. That type of static imagery should be stored in cache and not backed up (so you'll need to check if it exists and re-download if necessary).