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

openStoreListing opens a version of the listing that does not have a rating widget #131

Open
1 task done
lukehutch opened this issue Aug 21, 2024 · 1 comment
Open
1 task done

Comments

@lukehutch
Copy link

lukehutch commented Aug 21, 2024

Read testing guidelines

When my app calls openStoreListing, one user reports that the Play Store listing does not allow him to rate the app. However, if he goes straight to the Play Store URL, he gets a different page that does let him rate the app.

(1) The listing after calling openStoreListing:



(2) The listing after visiting the above Play Store URL directly, on the same device:

@lukehutch
Copy link
Author

lukehutch commented Aug 26, 2024

The URL for the launched intent looks the same as the URL I provided for the direct Store link that works:

Uri.parse("https://play.google.com/store/apps/details?id=" + packageName)

Maybe .setData should be used to pass the URL to the browser, rather than passing the URL as the second argument of new Intent(...)?

https://stackoverflow.com/a/5327690/3950982

This is in fact how url_launcher launches URLs on Android:

https://github.com/flutter/packages/blob/b9715b7eac7d97428c4acde94a75dad5a7525668/packages/url_launcher/url_launcher_android/android/src/main/java/io/flutter/plugins/urllauncher/UrlLauncher.java#L89

So I actually replaced openStoreListing with the following in my app:

    await launchUrl(Uri.parse(Platform.isAndroid
        ? 'https://play.google.com/store/apps/details?id=$androidPackageName'
        : 'https://apps.apple.com/us/app/click-social/id$appStoreId'));

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

1 participant