Skip to content

Instantly share code, notes, and snippets.

@SergeiMikhailovskii
Created March 23, 2024 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergeiMikhailovskii/0ca381e036ade8d7203c6dbcd75078d9 to your computer and use it in GitHub Desktop.
Save SergeiMikhailovskii/0ca381e036ade8d7203c6dbcd75078d9 to your computer and use it in GitHub Desktop.
class AmazonInAppReviewInitParams(val context: Context)
class AmazonInAppReviewManager(
private val params: AmazonInAppReviewInitParams
) : InAppReviewDelegate {
override fun requestInAppReview() = flow {
val context = params.context
context.openMarket(
deeplink = "amzn://apps/android?p=${context.packageName}",
url = "https://www.amazon.com/gp/mas/dl/android?p=${context.packageName}"
)
emit(ReviewCode.NO_ERROR)
}
override fun requestInMarketReview() = requestInAppReview()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment