diff --git a/LMEMappeCatastaliApp.csproj b/LMEMappeCatastaliApp.csproj
index 4d69678..460c185 100644
--- a/LMEMappeCatastaliApp.csproj
+++ b/LMEMappeCatastaliApp.csproj
@@ -28,8 +28,8 @@
it.liviomerola.lmemappecatastali.pro
- 1.0.4
- 104
+ 1.0.5
+ 105
$(ApplicationDisplayVersion)
diff --git a/PLAY_STORE_PRO_CHECKLIST.md b/PLAY_STORE_PRO_CHECKLIST.md
index fda66e2..a26cd9d 100644
--- a/PLAY_STORE_PRO_CHECKLIST.md
+++ b/PLAY_STORE_PRO_CHECKLIST.md
@@ -4,7 +4,7 @@
- Nome: LME Mappe Catastali Pro.
- Package name Android: `it.liviomerola.lmemappecatastali.pro`.
-- Versione corrente Play: `1.0.4` / version code `104`.
+- Versione corrente da pubblicare: `1.0.5` / version code `105`.
- Formato Release Android: Android App Bundle (`.aab`).
- Target SDK Release: Android 16 / API 36.
diff --git a/Platforms/Android/AndroidPlayBillingService.cs b/Platforms/Android/AndroidPlayBillingService.cs
index 1fe6875..48e34bb 100644
--- a/Platforms/Android/AndroidPlayBillingService.cs
+++ b/Platforms/Android/AndroidPlayBillingService.cs
@@ -92,12 +92,20 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
{
try
{
+ if (string.IsNullOrWhiteSpace(basePlanId))
+ {
+ return PlayBillingResult.Failed("Piano LME Pro non valido.");
+ }
+
var details = await GetProductDetailsAsync(cancellationToken);
var offer = details?.GetSubscriptionOfferDetails()?
- .FirstOrDefault(item => item.BasePlanId == basePlanId && string.IsNullOrEmpty(item.OfferId));
+ .FirstOrDefault(item => item.BasePlanId == basePlanId
+ && string.IsNullOrEmpty(item.OfferId)
+ && !string.IsNullOrWhiteSpace(item.OfferToken));
if (details is null || offer is null)
{
- return PlayBillingResult.Failed("Piano LME Pro non disponibile. Verifica prodotto e base plan nella Play Console.");
+ return PlayBillingResult.Failed(
+ $"Piano {basePlanId} non disponibile su Google Play. Verifica che l'abbonamento lme_pro e il piano siano attivi per il tuo Paese.");
}
var productParams = BillingFlowParams.ProductDetailsParams.NewBuilder()
@@ -113,7 +121,8 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
var completion = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously);
_purchaseCompletion = completion;
using var registration = cancellationToken.Register(() => completion.TrySetCanceled(cancellationToken));
- var launchResult = _client.LaunchBillingFlow(activity, flow);
+ var launchResult = await MainThread.InvokeOnMainThreadAsync(() =>
+ _client.LaunchBillingFlow(activity, flow));
if (launchResult.ResponseCode != BillingResponseCode.Ok)
{
_purchaseCompletion = null;
@@ -182,7 +191,7 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
throw new InvalidOperationException(ToMessage(result.Result));
}
- return result.ProductDetailsList.FirstOrDefault();
+ return result.ProductDetailsList?.FirstOrDefault();
}
private async Task EnsureConnectedAsync(CancellationToken cancellationToken)
diff --git a/README.md b/README.md
index 2c5d4be..3bedc2b 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,16 @@ App .NET MAUI Blazor Hybrid per Android, iOS, Mac Catalyst e Windows, pensata pe
Informativa privacy: [PRIVACY_POLICY.md](PRIVACY_POLICY.md).
+## Versione Pro 1.0.5 test
+
+- Il flusso di acquisto Google Play gestisce correttamente prodotti o offerte non restituiti dal catalogo, senza mostrare eccezioni tecniche.
+- L'apertura della schermata di acquisto viene eseguita sul thread principale Android.
+
+## Versione Pro 1.0.4 test
+
+- I prezzi mensile e annuale vengono letti direttamente dal catalogo Google Play.
+- Il piano Base consente fino a 15 oggetti disegnati; LME Pro non applica limiti.
+
## Versione Pro 1.0.3 test
- I pannelli mobili rispettano la barra di navigazione Android e mantengono il pulsante Help completamente raggiungibile tramite scorrimento.