Library that allows to launch in app (or in market) review from the KMP shared code
Android and iOS
- Add the dependency you need into
commonMain
:
implementation("io.github.sergeimikhailovskii:in-app-review-kmp:$latest_tag") // Amazon, App Gallery, Galaxy Store
implementation("io.github.sergeimikhailovskii:in-app-review-kmp-google-play:$latest_tag") // Google Play + Amazon, App Gallery, Galaxy Store
implementation("io.github.sergeimikhailovskii:in-app-review-kmp-rustore:$latest_tag") // RuStore + Amazon, App Gallery, Galaxy Store
-
Create an instance of class that implements
InAppReviewDelegate
interface. Now library supports 3 implementations (depends on the market u need):AmazonInAppReviewManager
AppGalleryInAppReviewManager
AppStoreInAppReviewManager
GalaxyStoreInAppReviewManager
GooglePlayInAppReviewManager
RuStoreInAppReviewManager
-
To launch in-app review call
fun requestInAppReview(): Flow<ReviewCode>
By listening the returned flow events u can receive the ResultCode which indicates the result the process finished with
- Amazon opens the app page in market
- For App Gallery used in-app-comments function
- For App Store used StoreKit SKStoreReviewViewController
- For Galaxy Store used Galaxy Store review broadcast
- For Google Play used in-app-review api
- For RuStore used in-app-review-api
- To launch in-market review call
fun requestInMarketReview(): Flow<ReviewCode>
For App Gallery and Galaxy Store need to call
fun init()
this method registers activity result listener so u should invoke it before the fragment or activity is created
RuStore's impl has minSdk=26, other dependencies have minSdk=21
- Since new artifacts versions are published to the MavenCentral instead of Github Maven, the
group id
was changed:
dependencies {
+ implementation("io.github.sergeimikhailovskii:in-app-review-kmp:$latest_tag") // Amazon, App Gallery, Galaxy Store
- implementation("com.mikhailovskii.kmp:in-app-review-kmp:$latest_tag") // Amazon, App Gallery, Galaxy Store
+ implementation("io.github.sergeimikhailovskii:in-app-review-kmp-google-play:$latest_tag") // Google Play + Amazon, App Gallery, Galaxy Store
- implementation("com.mikhailovskii.kmp:in-app-review-kmp-google-play:$latest_tag") // Google Play + Amazon, App Gallery, Galaxy Store
+ implementation("io.github.sergeimikhailovskii:in-app-review-kmp-rustore:$latest_tag")
- implementation("com.mikhailovskii.kmp:in-app-review-kmp-rustore:$latest_tag") // RuStore + Amazon, App Gallery, Galaxy Store
}
- Separate repository can be deleted
dependencyResolutionManagement {
repositories {
+ mavenCentral()
- maven {
- url = uri("https://maven.pkg.github.com/SergeiMikhailovskii/kmp-app-review")
- credentials {
- username = System.getenv("GITHUB_USER")
- password = System.getenv("GITHUB_API_KEY")
- }
- }
}
}
- Google Play's implementation was moved from the in-app-review-kmp module to the in-app-review-kmp-google-play module. Reason is the following - starting from the version 2.0 library supports more stores, stores that use own sdk for the review process are moved to separate modules to avoid adding unnecessary dependencies for stores that don't need any SDK like AppGallery, Galaxy Store and Amazon Store.
- Deleted
fun getDefaultReviewManager(params: DefaultInAppReviewInitParams): InAppReviewDelegate
Just create your own implementation of the InAppReviewDelegate
interface.
There are no differences between your own implementation and the implementation out of the library.
Main idea of the library is to provide the vision how the review process can be shared.
Also it aims to collect as much implementations as it can be, so PRs are welcome :)