Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29c3848a22 | ||
|
|
f27e47d83a |
No files matched your search
@@ -28,8 +28,8 @@
|
|||||||
<ApplicationId>it.liviomerola.lmemappecatastali.pro</ApplicationId>
|
<ApplicationId>it.liviomerola.lmemappecatastali.pro</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.0.7</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0.9</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>107</ApplicationVersion>
|
<ApplicationVersion>109</ApplicationVersion>
|
||||||
<Version>$(ApplicationDisplayVersion)</Version>
|
<Version>$(ApplicationDisplayVersion)</Version>
|
||||||
|
|
||||||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
- Nome: LME Mappe Catastali Pro.
|
- Nome: LME Mappe Catastali Pro.
|
||||||
- Package name Android: `it.liviomerola.lmemappecatastali.pro`.
|
- Package name Android: `it.liviomerola.lmemappecatastali.pro`.
|
||||||
- Versione corrente da pubblicare: `1.0.7` / version code `107`.
|
- Versione corrente da pubblicare: `1.0.9` / version code `109`.
|
||||||
- Formato Release Android: Android App Bundle (`.aab`).
|
- Formato Release Android: Android App Bundle (`.aab`).
|
||||||
- Target SDK Release: Android 16 / API 36.
|
- Target SDK Release: Android 16 / API 36.
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
|
|||||||
private readonly SemaphoreSlim _connectionLock = new(1, 1);
|
private readonly SemaphoreSlim _connectionLock = new(1, 1);
|
||||||
private readonly BillingClient _client;
|
private readonly BillingClient _client;
|
||||||
private TaskCompletionSource<PlayBillingResult>? _purchaseCompletion;
|
private TaskCompletionSource<PlayBillingResult>? _purchaseCompletion;
|
||||||
|
private string? _lastCatalogFailure;
|
||||||
|
|
||||||
public AndroidPlayBillingService()
|
public AndroidPlayBillingService()
|
||||||
{
|
{
|
||||||
@@ -31,7 +32,12 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
|
|||||||
{
|
{
|
||||||
var details = await GetProductDetailsAsync(cancellationToken);
|
var details = await GetProductDetailsAsync(cancellationToken);
|
||||||
return details?.GetSubscriptionOfferDetails()?
|
return details?.GetSubscriptionOfferDetails()?
|
||||||
.Where(item => string.IsNullOrEmpty(item.OfferId))
|
.Where(item => !string.IsNullOrWhiteSpace(item.BasePlanId)
|
||||||
|
&& !string.IsNullOrWhiteSpace(item.OfferToken))
|
||||||
|
.GroupBy(item => item.BasePlanId, StringComparer.Ordinal)
|
||||||
|
.Select(group => group
|
||||||
|
.OrderBy(item => string.IsNullOrEmpty(item.OfferId) ? 0 : 1)
|
||||||
|
.First())
|
||||||
.Select(item =>
|
.Select(item =>
|
||||||
{
|
{
|
||||||
var phase = item.PricingPhases.PricingPhaseList.LastOrDefault();
|
var phase = item.PricingPhases.PricingPhaseList.LastOrDefault();
|
||||||
@@ -99,13 +105,25 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
|
|||||||
|
|
||||||
var details = await GetProductDetailsAsync(cancellationToken);
|
var details = await GetProductDetailsAsync(cancellationToken);
|
||||||
var offer = details?.GetSubscriptionOfferDetails()?
|
var offer = details?.GetSubscriptionOfferDetails()?
|
||||||
.FirstOrDefault(item => item.BasePlanId == basePlanId
|
.Where(item => item.BasePlanId == basePlanId
|
||||||
&& string.IsNullOrEmpty(item.OfferId)
|
&& !string.IsNullOrWhiteSpace(item.OfferToken))
|
||||||
&& !string.IsNullOrWhiteSpace(item.OfferToken));
|
.OrderBy(item => string.IsNullOrEmpty(item.OfferId) ? 0 : 1)
|
||||||
if (details is null || offer is null)
|
.FirstOrDefault();
|
||||||
|
if (details is null)
|
||||||
{
|
{
|
||||||
return PlayBillingResult.Failed(
|
return PlayBillingResult.Failed(_lastCatalogFailure
|
||||||
$"Piano {basePlanId} non disponibile su Google Play. Verifica che l'abbonamento lme_pro e il piano siano attivi per il tuo Paese.");
|
?? "Google Play non ha restituito l'abbonamento lme_pro.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (offer is null)
|
||||||
|
{
|
||||||
|
var availablePlans = string.Join(", ", details.GetSubscriptionOfferDetails()?
|
||||||
|
.Select(item => item.BasePlanId)
|
||||||
|
.Where(item => !string.IsNullOrWhiteSpace(item))
|
||||||
|
.Distinct(StringComparer.Ordinal) ?? []);
|
||||||
|
return PlayBillingResult.Failed(string.IsNullOrWhiteSpace(availablePlans)
|
||||||
|
? $"Google Play ha restituito lme_pro senza offerte acquistabili per il piano {basePlanId}."
|
||||||
|
: $"Piano {basePlanId} non restituito da Google Play. Piani ricevuti: {availablePlans}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var productParams = BillingFlowParams.ProductDetailsParams.NewBuilder()
|
var productParams = BillingFlowParams.ProductDetailsParams.NewBuilder()
|
||||||
@@ -191,7 +209,17 @@ public sealed class AndroidPlayBillingService : Java.Lang.Object, IPlayBillingSe
|
|||||||
throw new InvalidOperationException(ToMessage(result.Result));
|
throw new InvalidOperationException(ToMessage(result.Result));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.ProductDetailsList?.FirstOrDefault();
|
// The .NET async wrapper copies the Java result into the managed
|
||||||
|
// ProductDetails property; ProductDetailsList has no Java handle here.
|
||||||
|
var details = result.ProductDetails?.FirstOrDefault();
|
||||||
|
if (details is not null)
|
||||||
|
{
|
||||||
|
_lastCatalogFailure = null;
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
|
||||||
|
_lastCatalogFailure = "Google Play ha restituito un catalogo vuoto per lme_pro. Verifica account Play Store, adesione al test e origine dell'installazione.";
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task EnsureConnectedAsync(CancellationToken cancellationToken)
|
private async Task EnsureConnectedAsync(CancellationToken cancellationToken)
|
||||||
|
|||||||
@@ -4,6 +4,15 @@ App .NET MAUI Blazor Hybrid per Android, iOS, Mac Catalyst e Windows, pensata pe
|
|||||||
|
|
||||||
Informativa privacy: [PRIVACY_POLICY.md](PRIVACY_POLICY.md).
|
Informativa privacy: [PRIVACY_POLICY.md](PRIVACY_POLICY.md).
|
||||||
|
|
||||||
|
## Versione Pro 1.0.9 test
|
||||||
|
|
||||||
|
- Corregge la lettura del catalogo dal wrapper asincrono .NET di Google Play Billing, usando la raccolta managed `ProductDetails` popolata dal binding.
|
||||||
|
|
||||||
|
## Versione Pro 1.0.8 test
|
||||||
|
|
||||||
|
- Google Play Billing accetta tutte le offerte idonee restituite per i piani `monthly` e `yearly`, preferendo il piano base quando disponibile.
|
||||||
|
- In caso di catalogo vuoto o prodotto non caricato, il messaggio mostra una diagnostica specifica restituita da Google Play.
|
||||||
|
|
||||||
## Versione Pro 1.0.7 test
|
## Versione Pro 1.0.7 test
|
||||||
|
|
||||||
- I messaggi informativi su telefono vengono mostrati sopra i controlli zoom e possono occupare fino a tre righe senza sovrapporsi.
|
- I messaggi informativi su telefono vengono mostrati sopra i controlli zoom e possono occupare fino a tre righe senza sovrapporsi.
|
||||||
|
|||||||
Reference in new issue
Block a user