Skip to content

Rating model implementation for third-party stores - #680

Merged
andrewtavis merged 14 commits into
scribe-org:mainfrom
ashb155:rating-model
Aug 31, 2026
Merged

Rating model implementation for third-party stores#680
andrewtavis merged 14 commits into
scribe-org:mainfrom
ashb155:rating-model

Conversation

@ashb155

@ashb155 ashb155 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Contributor checklist


Description

This PR expands the "Rate Us" functionality on the About Page by dynamically detecting the installation source (added PackageManager.getInstallSourceInfo method for Android 11+ along with existing getInstallerPackageName()) and rendering a contextual subtitle and intent link (Google Play, F-Droid, Amazon, and Galaxy Store).
Previously, the rating item only showed a generic "Rate Scribe" and lacked support for alternative app stores like Amazon and Samsung. Now, it accurately reflects where the user downloaded the app and routes them there directly.

The external store URLs are constructed dynamically using the app's package name (e.g., https://f-droid.org/packages/${context.packageName}, https://www.amazon.com/gp/mas/dl/android?p=${context.packageName}) as dummy links, which can be modified later as required.

For other third party stores, we default to Google Play Store, which again, can be modified as required.

Related issue

@ashb155
ashb155 requested a review from andrewtavis August 21, 2026 17:54
@andrewtavis andrewtavis added the -next release- Included in the next release label Aug 21, 2026
@andrewtavis

Copy link
Copy Markdown
Member

Thanks so much for this, @ashb155! We'll try to review it soon :)

@angrezichatterbox angrezichatterbox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ashb155
Thanks for the PR.

https://github.com/ashb155/Scribe-Android/blob/f132f103d571cc0780d4b339c43976e2a92eb1c8/app/src/main/java/be/scri/helpers/ui/RatingHelper.kt#L83-L95

Instead of the inbuild review flow fail leading to a toast could the user be instead be redirected to the playstore page. This would be better for the user experience.

@ashb155

ashb155 commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

will work on this @angrezichatterbox!

@andrewtavis

Copy link
Copy Markdown
Member

Let us know when this is ready for further review, @ashb155 :)

@ashb155

ashb155 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator Author

should be good to go @andrewtavis! i guess tests are passing now

@andrewtavis

Copy link
Copy Markdown
Member

Great to hear, @ashb155! Let us know how this is looking, @angrezichatterbox :)

@angrezichatterbox angrezichatterbox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick changes @ashb155. I have a small nitpick suggestion to add on once thats done this PR would be good to go.

Comment thread app/src/main/java/be/scri/helpers/ui/RatingHelper.kt
@angrezichatterbox
angrezichatterbox self-requested a review August 30, 2026 16:43
@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

hi @angrezichatterbox , just made the changes required, do let me know if its good to go

@Roniscend

Copy link
Copy Markdown
Collaborator

@ashb155 GetStoreDesc returns hardcoded English strings instead of stringResource like the rest of AboutUtil.kt, and given Scribe's i18n focus, these should probably be proper string resources

@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

@Roniscend, as discussed with @andrewtavis in the related issue, plan is to hardcode them first and then get them over to scribe i18n later

@andrewtavis

Copy link
Copy Markdown
Member

Thanks all for the conversation here 💙

@ashb155, do you want to open a PR in Scribe-i18n with the needed strings and we'll bring that in and then into this PR? I guess it would make sense if we finalize the strings with the merge here.

@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

sounds good @andrewtavis, will have the i18n PR ready as well in a bit

@angrezichatterbox angrezichatterbox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @ashb155
Everything looks good now : )

@andrewtavis

Copy link
Copy Markdown
Member

Thanks for the review here, @angrezichatterbox and @Roniscend! Let's wait for the Scribe-i18n PR and then bring the changes in here so we're finalizing the whole process in one PR. Good to know we can merge once the Scribe-i18n changes are brought in though!

@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

have linked the i18n PR @andrewtavis, do have a look and let me know if any changes!

@andrewtavis

Copy link
Copy Markdown
Member

Hey @ashb155! Already has been merged! Feel free to update the PR here with the latest Scribe-i18n and we can merge!

note: I updated your keys to be description_* instead of desc_*, fyi :)

@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

great to hear @andrewtavis, will keep naming conventions as consistent as it can be for any future changes
should have this final change ready in a bit

@ashb155

ashb155 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

looks like tests are passing @andrewtavis , do let me know if any more changes or if this is good to go!

@andrewtavis andrewtavis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: All's looking and working really well, @ashb155! Great that this is coming in so quickly! 😊 Looking forward to updating this with all the proper URLs and new stores post launch 🚀

try {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
Toast.makeText(context, "No browser found to open $storeName page", Toast.LENGTH_SHORT).show()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This Toast would also ideally be localized, but maybe we can do an audit of the toasts to see if there are others that aren't localized? Do you want to look into that, @ashb155?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will create an issue for this and work on complete audit and i18n integration @andrewtavis

@andrewtavis andrewtavis Sep 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Please reference this PR and ping me in there :) And feel free to assign yourself!

@andrewtavis
andrewtavis merged commit 0006589 into scribe-org:main Aug 31, 2026
7 checks passed
@ashb155

ashb155 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

praise: All's looking and working really well, @ashb155! Great that this is coming in so quickly! 😊 Looking forward to updating this with all the proper URLs and new stores post launch 🚀

yea @andrewtavis , registering the app with the package name should be all we need right now since the links are generated dynamically, if anything changes, we still have the flexibility to update the configuration post-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-next release- Included in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants