@capillarytech/react-native-hydra-lib 1.7.0-beta.6 → 1.7.0-beta.7
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
|
@@ -178,14 +178,14 @@ dependencies {
|
|
|
178
178
|
//noinspection GradleDependency
|
|
179
179
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
180
180
|
|
|
181
|
-
implementation "com.capillarytech:hydra-core:1.9.22-
|
|
182
|
-
implementation "com.capillarytech:hydra-pushbase:1.9.22-
|
|
183
|
-
implementation "com.capillarytech:hydra-firebase:1.9.22-
|
|
184
|
-
implementation "com.capillarytech:hydra-richnotification:1.9.22-
|
|
185
|
-
|
|
186
|
-
implementation "com.capillarytech:hydra-inbox-core:1.9.22-
|
|
187
|
-
implementation "com.capillarytech:hydra-inbox-ui:1.9.22-
|
|
188
|
-
implementation "com.capillarytech:hydra-inapp:1.9.22-
|
|
181
|
+
implementation "com.capillarytech:hydra-core:1.9.22-beta07"
|
|
182
|
+
implementation "com.capillarytech:hydra-pushbase:1.9.22-beta07"
|
|
183
|
+
implementation "com.capillarytech:hydra-firebase:1.9.22-beta07"
|
|
184
|
+
implementation "com.capillarytech:hydra-richnotification:1.9.22-beta07"
|
|
185
|
+
|
|
186
|
+
implementation "com.capillarytech:hydra-inbox-core:1.9.22-beta07"
|
|
187
|
+
implementation "com.capillarytech:hydra-inbox-ui:1.9.22-beta07"
|
|
188
|
+
implementation "com.capillarytech:hydra-inapp:1.9.22-beta07"
|
|
189
189
|
implementation "com.google.firebase:firebase-messaging-ktx:24.1.0"
|
|
190
190
|
|
|
191
191
|
implementation "com.google.code.gson:gson:2.11.0"
|
|
@@ -242,7 +242,7 @@ object HydraCore {
|
|
|
242
242
|
val cgWriteKey = hydraRemoteConfig.gamificationKey ?: ""
|
|
243
243
|
val cgRegion = hydraRemoteConfig.gamificationRegion ?: ""
|
|
244
244
|
val cgBaseUrl = hydraRemoteConfig.gamificationBaseUrl ?: ""
|
|
245
|
-
if (cgWriteKey.isNotEmpty()
|
|
245
|
+
if (cgWriteKey.isNotEmpty()) {
|
|
246
246
|
gamificationWriteKey(cgWriteKey)
|
|
247
247
|
try {
|
|
248
248
|
gamificationRegion(GamificationRegion.valueOf(cgRegion.uppercase()))
|
|
@@ -6,10 +6,12 @@ import android.app.NotificationManager
|
|
|
6
6
|
import android.app.PendingIntent
|
|
7
7
|
import android.content.Context
|
|
8
8
|
import android.content.Intent
|
|
9
|
+
import android.content.pm.PackageManager
|
|
9
10
|
import android.net.Uri
|
|
10
11
|
import android.os.Build
|
|
11
12
|
import com.hydralib.delegates.NonHydraNotificationActivity
|
|
12
13
|
import androidx.core.app.NotificationCompat
|
|
14
|
+
import androidx.core.content.ContextCompat
|
|
13
15
|
import com.capillary.hydra.android.sdk.utils.Logger
|
|
14
16
|
import com.capillary.hydra.firebase.HydraFirebaseAPI
|
|
15
17
|
import com.capillary.hydra.firebase.listener.NonHydraPushListener
|
|
@@ -155,6 +157,32 @@ object HydraPushNotification {
|
|
|
155
157
|
return
|
|
156
158
|
}
|
|
157
159
|
|
|
160
|
+
// Already granted: answer from the OS state instead of asking again. requestPushPermission
|
|
161
|
+
// starts PermissionActivity unconditionally, and that activity lands in the host app's task
|
|
162
|
+
// even when it has nothing to show and finishes immediately. During a notification-click
|
|
163
|
+
// cold start that pulls the app back on top of the browser we just handed an EXTERNAL CTA
|
|
164
|
+
// to, so the external link looks like it did nothing.
|
|
165
|
+
//
|
|
166
|
+
// Placed before the listener registration on purpose: the promise below is resolved from
|
|
167
|
+
// NotificationPermissionListener, which only fires in response to requestPushPermission, so
|
|
168
|
+
// returning after registering would leak a listener that never fires and hang the promise.
|
|
169
|
+
// Spelled out rather than Manifest.permission.POST_NOTIFICATIONS: that constant is API 33,
|
|
170
|
+
// and this library's compileSdkVersion falls back to 31 (gradle.properties) for any host app
|
|
171
|
+
// whose rootProject.ext does not override it, so the symbol would not resolve there. The
|
|
172
|
+
// string is the platform's own value and is stable.
|
|
173
|
+
val context = HydraCore.appContext
|
|
174
|
+
if (context != null &&
|
|
175
|
+
ContextCompat.checkSelfPermission(context, "android.permission.POST_NOTIFICATIONS")
|
|
176
|
+
== PackageManager.PERMISSION_GRANTED
|
|
177
|
+
) {
|
|
178
|
+
Logger.d(
|
|
179
|
+
"HydraPushNotification.requestPermission",
|
|
180
|
+
"POST_NOTIFICATIONS already granted, resolving without starting PermissionActivity"
|
|
181
|
+
)
|
|
182
|
+
promise?.resolve(true)
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
|
|
158
186
|
var listener: NotificationPermissionListener? = null
|
|
159
187
|
listener = NotificationPermissionListener { isGranted ->
|
|
160
188
|
Logger.d(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/react-native-hydra-lib",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.7",
|
|
4
4
|
"description": "Library to use Hydra native iOS and Native Android SDKs in React Native",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
package/sbom.spdx.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
5
|
"name": "capillarytech-react-native-hydra-lib-sbom",
|
|
6
|
-
"documentNamespace": "https://github.com/Capillary/react-native-hydra-lib/sbom-
|
|
6
|
+
"documentNamespace": "https://github.com/Capillary/react-native-hydra-lib/sbom-5e0ed91f",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-
|
|
8
|
+
"created": "2026-09-03T09:39:59.695Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: react-native-hydra-lib-sbom-generator-v1.0.0",
|
|
11
|
-
"Tool: @capillarytech/react-native-hydra-lib@1.7.0-beta.
|
|
11
|
+
"Tool: @capillarytech/react-native-hydra-lib@1.7.0-beta.7"
|
|
12
12
|
],
|
|
13
13
|
"licenseListVersion": "3.19"
|
|
14
14
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"licenseConcluded": "MIT",
|
|
22
22
|
"licenseDeclared": "MIT",
|
|
23
23
|
"copyrightText": "Copyright (c) Sandesh Jain <sandesh.Jain@capillarytech.com> (https://docs.capillarytech.com/reference/setting-up-react-native-project-for-hydra-sdk)",
|
|
24
|
-
"versionInfo": "1.7.0-beta.
|
|
24
|
+
"versionInfo": "1.7.0-beta.7",
|
|
25
25
|
"supplier": "Person: Sandesh Jain <sandesh.Jain@capillarytech.com> (https://docs.capillarytech.com/reference/setting-up-react-native-project-for-hydra-sdk)",
|
|
26
26
|
"homepage": "https://github.com/Capillary/react-native-hydra-lib#readme",
|
|
27
27
|
"description": "Library to use Hydra native iOS and Native Android SDKs in React Native",
|