react-native-rate-app 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -81,10 +81,13 @@ android {
|
|
|
81
81
|
sourceSets {
|
|
82
82
|
main {
|
|
83
83
|
if (isNewArchitectureEnabled()) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
java.srcDirs += [
|
|
85
|
+
"src/newarch",
|
|
86
|
+
"generated/java",
|
|
87
|
+
"generated/jni"
|
|
87
88
|
]
|
|
89
|
+
} else {
|
|
90
|
+
java.srcDirs += ["src/oldarch"]
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
}
|
|
@@ -19,7 +19,7 @@ import com.google.android.play.core.review.ReviewManagerFactory
|
|
|
19
19
|
|
|
20
20
|
@ReactModule(name = RateAppModule.NAME)
|
|
21
21
|
class RateAppModule(reactContext: ReactApplicationContext) :
|
|
22
|
-
|
|
22
|
+
RateAppSpec(reactContext), ActivityEventListener {
|
|
23
23
|
|
|
24
24
|
init {
|
|
25
25
|
reactContext.addActivityEventListener(this)
|
|
@@ -29,6 +29,7 @@ class RateAppModule(reactContext: ReactApplicationContext) :
|
|
|
29
29
|
return NAME
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
@ReactMethod
|
|
32
33
|
override fun requestReview(promise: Promise) {
|
|
33
34
|
val manager: ReviewManager = ReviewManagerFactory.create(reactApplicationContext)
|
|
34
35
|
val request = manager.requestReviewFlow()
|
|
@@ -53,6 +54,7 @@ class RateAppModule(reactContext: ReactApplicationContext) :
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
@ReactMethod
|
|
56
58
|
override fun requestReviewAppGallery(promise: Promise) {
|
|
57
59
|
promiseAppGallery = promise;
|
|
58
60
|
val intent = Intent("com.huawei.appmarket.intent.action.guidecomment")
|
|
@@ -72,6 +74,7 @@ class RateAppModule(reactContext: ReactApplicationContext) :
|
|
|
72
74
|
}
|
|
73
75
|
}
|
|
74
76
|
|
|
77
|
+
@ReactMethod
|
|
75
78
|
override fun requestReviewGalaxyStore(packageName: String, promise: Promise) {
|
|
76
79
|
val ai = reactApplicationContext.packageManager.getApplicationInfo("com.sec.android.app.samsungapps", PackageManager.GET_META_DATA)
|
|
77
80
|
val inappReviewVersion = ai.metaData.getInt("com.sec.android.app.samsungapps.review.inappReview", 0)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
package com.rateapp
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ActivityEventListener
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
|
|
6
|
+
abstract class RateAppSpec internal constructor(context: ReactApplicationContext) :
|
|
7
|
+
NativeRateAppSpec(context), ActivityEventListener {
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package com.rateapp
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ActivityEventListener
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
6
|
+
import com.facebook.react.bridge.Promise
|
|
7
|
+
|
|
8
|
+
abstract class RateAppSpec internal constructor(context: ReactApplicationContext) :
|
|
9
|
+
ReactContextBaseJavaModule(context), ActivityEventListener {
|
|
10
|
+
|
|
11
|
+
abstract fun requestReview(promise: Promise)
|
|
12
|
+
abstract fun requestReviewAppGallery(promise: Promise)
|
|
13
|
+
abstract fun requestReviewGalaxyStore(packageName: String, promise: Promise)
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-rate-app",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "React Native module for In App Rating on Android and iOS",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"workspaces": [
|
|
100
100
|
"example"
|
|
101
101
|
],
|
|
102
|
-
"packageManager": "yarn@3.
|
|
102
|
+
"packageManager": "yarn@3.8.7",
|
|
103
103
|
"jest": {
|
|
104
104
|
"preset": "react-native",
|
|
105
105
|
"modulePathIgnorePatterns": [
|