Skip to content
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

formatted price is not expected format #969

Open
5 tasks done
fan123199 opened this issue Apr 16, 2023 · 4 comments
Open
5 tasks done

formatted price is not expected format #969

fan123199 opened this issue Apr 16, 2023 · 4 comments
Assignees

Comments

@fan123199
Copy link

Describe the bug

When I updated to 6.1.1 version. I use the com.revenuecat.purchases.models.Price to get the formatted price, what I excepted output is like the doc "$3.00", but now I get "US$3.00". It is different vs 5.x.x. It this a bug or I have another way to get "$3.00"

    /**
     * Formatted price of the item, including its currency sign. For example $3.00.
     */
    val formatted: String,
    ...
  1. Environment
    1. Platform: Android
    2. SDK version: 6.1.1
    3. OS version: Android 14 beta
    4. Android Studio version: Android Studio F
    5. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
Add any other context about the problem here.

@fan123199 fan123199 added the bug label Apr 16, 2023
@RCGitBot
Copy link
Contributor

RCGitBot commented Apr 16, 2023

👀 SDKONCALL-257 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@aboedo
Copy link
Member

aboedo commented Apr 18, 2023

Hi @fan123199 thanks for reporting!

I think this is likely the difference in behavior between the underlying methods from Google's BillingClient v4 vs BillingClient v5, where our SDK v5 used SkuDetails.getOriginalPrice and the new one uses ProductDetails.getPrice. I couldn't find an equivalent method to getOriginalPrice in Google BillingClient v5 at a quick glance, so I brought this up with the team to see what we can do.

@aboedo
Copy link
Member

aboedo commented Apr 18, 2023

@fan123199 we're having a hard time reproducing this locally, we tried with accounts in US locale and in Spain locale for good measure, both in our v5 and v6 SDKs, with different locale settings that the device level too.

Google doesn't document this behavior, so we're trying to figure it out IRL, sadly.

What locale do you have your device set to? Does this reproduce consistently for you in non-beta OS versions too?

@aboedo aboedo self-assigned this Apr 18, 2023
@fan123199
Copy link
Author

Oh, sorry for late reply. I miss the notification.
I test with my another device in Android 13. I found it works as expected, I get "$4.0.0", So I think it maybe caused by platform change with Android 14. So I think we could just wait Google to fix it's billing lib~

@vegaro vegaro removed the bug label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants