-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4784e5e
commit d3f11a7
Showing
7 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/src/main/java/tj/rsdevteam/inmuslim/utils/AndroidExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package tj.rsdevteam.inmuslim.utils | ||
|
||
import android.app.Activity | ||
import com.google.android.play.core.review.ReviewManagerFactory | ||
|
||
/** | ||
* Created by Rustam Safarov on 6/25/24. | ||
* github.com/rustamsafarovrs | ||
*/ | ||
|
||
fun Activity.launchInAppReview( | ||
onComplete: (() -> Unit)? = null, | ||
) { | ||
val reviewManager = ReviewManagerFactory.create(this) | ||
reviewManager.requestReviewFlow().addOnCompleteListener { task -> | ||
if (task.isSuccessful) { | ||
reviewManager.launchReviewFlow(this, task.result).addOnCompleteListener { onComplete?.invoke() } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters