New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[in_app_purchase][android] currencySymbol is missing #147565
Comments
@dgminhngoc |
currently I'm using in_app_purchase 3.1.13 and in_app_purchase_storekit 0.3.4 (because in_app_purchase 3.2.0 requires in_app_purchase_storekit 0.3.14 which decodes null "countryCode" value on iOS, I have no idea if this bug related to XCode Storekit so haven't report yet). I tested also in_app_purchase 3.2.0 and this issue remains. The 2 screenshot are from Emulator - Android 13 with Google Play (currencySymbol is Euro) and from Galaxy S24 - Android 14 (currencySymbol missing) |
Thanks for the update @dgminhngoc
Could this be due to the locale you are using on both the emulators / devices ? I see that the Euro symbol is to the left and to the right in respective screenshots ? Can you check if this is the case ? |
Ah yes, locale on Emulator - Android 13 with Google Play is US/us whereas on my Galaxy S21 (S24 was typo, but it doesn't matter) is DE/de. After locale of emulator is changed from US/us to De/de, the price is changed automatically from "€4.99" to "4.99 €" and currentcySymbol is now empty. on my Galaxy S21, I tested with the current version of my app downloaded from Google Play Store (I built with Flutter 3.7 at that time) and saw no issues, currencySymbol is always available |
Thanks for the update. Keeping the issue open for tracking. |
@dgminhngoc I am trying to figure out the conditions that cause the issue. Is it that the locale needs to change or that this is a regression from version x to version y? If it is a locale change what are the good and bad locale's? |
I think the problem is from this function of google_play_product_detail.dart it cannot extract currencySymbol from the price "4,99 €" but works when the price is "€4.99". |
I tried to use dartpad to validate the regular expression.
and it matches just fine. I dont think we should use https://api.flutter.dev/flutter/intl/NumberFormat/simpleCurrencySymbol.html in the plugin because we are trying to expose google play vended values. As a work around this bug then authors could choose to use it though. |
Steps to reproduce
Just request ProductDetail from InAppPurchase.instance.queryProductDetails(_kProductIds)
Expected results
Euro symbol is displayed
Actual results
Euro symbol is missing
Code sample
await InAppPurchase.instance.queryProductDetails(_kProductIds);
Screenshots or Video
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: