Giter Site home page Giter Site logo

kmp-app-review's Introduction

kmp-app-review

Publish new version GitHub Tag

What is it?

Library that allows to launch in app (or in market) review from the KMP shared code

Which platforms are supported?

Android and iOS

How to integrate?

  1. 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
  1. 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
  2. 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

  1. To launch in-market review call
    fun requestInMarketReview(): Flow<ReviewCode>

Note 1

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

Note 2

RuStore's impl has minSdk=26, other dependencies have minSdk=21

Breaking changes in the version 3.0

  1. 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
}
  1. 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")
-            }
-        }
    }
}

Breaking changes in the version 2.0

  1. 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.
  2. Deleted
fun getDefaultReviewManager(params: DefaultInAppReviewInitParams): InAppReviewDelegate

Here u can see the sample integrations:

What to do if I need to support some other market?

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 :)

kmp-app-review's People

Contributors

renovate[bot] avatar sergeimikhailovskii avatar sergei-mikhailovskii-idf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.