infobip-mobile-messaging-react-native-plugin 13.11.2 → 14.1.0
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/README.md +10 -11
- package/android/build.gradle +52 -83
- package/android/gradle.properties +2 -1
- package/android/gradlew +0 -0
- package/android/infobip-mm-proguard-rules.pro +14 -2
- package/android/src/main/AndroidManifest.xml +8 -2
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/CacheManager.java +8 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ConfigCache.kt +15 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/Configuration.java +9 -1
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/PermissionsRequestManager.java +8 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatService.kt +414 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatView.kt +176 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMWebRTCUIService.kt +169 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeBroadcastReceiver.kt +38 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeEvent.java +8 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeMobileMessagingPackage.kt +97 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeMobileMessagingService.kt +1099 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/Utils.java +9 -1
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/datamappers/ReactNativeJson.java +8 -0
- package/android/src/newarchitecture/java/org/infobip/reactlibrary/mobilemessaging/MobileMessagingModule.kt +206 -0
- package/android/src/newarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatModule.kt +106 -0
- package/android/src/newarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatViewManager.kt +68 -0
- package/android/src/newarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMWebRTCUIModule.kt +45 -0
- package/android/src/oldarchitecture/java/org/infobip/reactlibrary/mobilemessaging/MobileMessagingModule.kt +237 -0
- package/android/src/oldarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatModule.kt +123 -0
- package/android/src/oldarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatViewManager.kt +93 -0
- package/android/src/oldarchitecture/java/org/infobip/reactlibrary/mobilemessaging/RNMMWebRTCUIModule.kt +52 -0
- package/infobip-mobile-messaging-react-native-plugin-14.0.0.tgz +0 -0
- package/infobip-mobile-messaging-react-native-plugin.podspec +2 -2
- package/ios/MobileMessagingPlugin/RNMMChat.swift +4 -3
- package/ios/MobileMessagingPlugin/RNMMChatBridge.m +3 -2
- package/ios/MobileMessagingPlugin/RNMMChatCustomization.swift +3 -2
- package/ios/MobileMessagingPlugin/RNMMChatViewManager.swift +3 -2
- package/ios/MobileMessagingPlugin/RNMMChatViewManagerBridge.m +3 -2
- package/ios/MobileMessagingPlugin/RNMMWebRTCUI.swift +3 -2
- package/ios/MobileMessagingPlugin/RNMMWebRTCUIBridge.m +4 -3
- package/ios/MobileMessagingPlugin/RNMobileMessaging.swift +4 -3
- package/ios/MobileMessagingPlugin/RNMobileMessagingBridge.m +5 -4
- package/ios/MobileMessagingPlugin/RNMobileMessagingConfiguration.swift +9 -3
- package/ios/MobileMessagingPlugin/RNMobileMessagingErrorExtension.swift +3 -2
- package/ios/MobileMessagingPlugin/RNMobileMessagingEventsManager.swift +4 -3
- package/ios/MobileMessagingPlugin/RNMobileMessagingStorageAdapter.swift +3 -2
- package/ios/MobileMessagingPlugin/RNMobileMessagingUtils.swift +4 -3
- package/ios/ReactNativeMobileMessaging-Bridging-Header.h +7 -1
- package/ios/ReactNativeMobileMessaging.xcodeproj/project.pbxproj +2 -2
- package/package.json +13 -3
- package/scripts/add-copyright-header.js +151 -0
- package/src/components/ChatView.tsx +202 -0
- package/src/index.d.ts +44 -26
- package/src/index.js +16 -11
- package/src/specs/NativeMobileMessaging.ts +67 -0
- package/src/specs/NativeRNMMChat.ts +29 -0
- package/src/specs/NativeRNMMWebRTCUI.ts +17 -0
- package/src/specs/RNMMChatViewNativeComponent.ts +35 -0
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ChatCustomization.java +0 -551
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ConfigCache.java +0 -22
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatModule.java +0 -397
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMChatViewManager.java +0 -99
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/RNMMWebRTCUI.java +0 -172
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactChatView.java +0 -182
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeMobileMessagingModule.java +0 -1130
- package/android/src/main/java/org/infobip/reactlibrary/mobilemessaging/ReactNativeMobileMessagingPackage.java +0 -31
- package/infobip-mobile-messaging-react-native-plugin-13.11.1.tgz +0 -0
- package/infobip-mobile-messaging-react-native-plugin.tgz +0 -0
- package/src/components/RNMMChatViewNativeComponent.js +0 -119
package/README.md
CHANGED
|
@@ -11,18 +11,18 @@ The document describes library integration steps for your React Native project.
|
|
|
11
11
|
|
|
12
12
|
## Requirements
|
|
13
13
|
- node (v20.16.0 or higher)
|
|
14
|
-
- ruby (2.7.8 or higher)
|
|
15
|
-
- React Native (v0.
|
|
14
|
+
- ruby (2.7.8 or higher; the Example app uses 3.3.5)
|
|
15
|
+
- React Native (v0.79.0)
|
|
16
16
|
|
|
17
17
|
For iOS project:
|
|
18
|
-
- Xcode and Command Line Tools (16.x)
|
|
19
|
-
- CocoaPods (v1.
|
|
20
|
-
- Minimum deployment target
|
|
18
|
+
- Xcode and Command Line Tools (16.x or newer, tested with 26.0.1)
|
|
19
|
+
- CocoaPods (v1.16.x)
|
|
20
|
+
- Minimum deployment target 15.1
|
|
21
21
|
|
|
22
22
|
For Android project:
|
|
23
|
-
- Android Studio (
|
|
24
|
-
- Gradle (v8.
|
|
25
|
-
- Supported API Levels:
|
|
23
|
+
- Android Studio (Narwhal | 2025.1.3)
|
|
24
|
+
- Gradle (v8.13)
|
|
25
|
+
- Supported API Levels: 24 (Android 7.0 - [Nougat](https://developer.android.com/about/versions/nougat)) - 35 ([Android 15.0](https://developer.android.com/about/versions/15))
|
|
26
26
|
|
|
27
27
|
## Quick start guide
|
|
28
28
|
|
|
@@ -75,8 +75,8 @@ This guide is designed to get you up and running with Mobile Messaging SDK plugi
|
|
|
75
75
|
...
|
|
76
76
|
dependencies {
|
|
77
77
|
...
|
|
78
|
-
//GMS Gradle plugin
|
|
79
|
-
classpath 'com.google.gms:google-services:4.
|
|
78
|
+
// GMS Gradle plugin
|
|
79
|
+
classpath 'com.google.gms:google-services:4.4.2'
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
```
|
|
@@ -151,4 +151,3 @@ someMethod(): void {
|
|
|
151
151
|
|
|
152
152
|
| If you have any questions or suggestions, feel free to send an email to support@infobip.com or create an <a href="https://github.com/infobip/mobile-messaging-react-native-plugin/issues" target="_blank">issue</a>. |
|
|
153
153
|
|---|
|
|
154
|
-
|
package/android/build.gradle
CHANGED
|
@@ -1,111 +1,85 @@
|
|
|
1
|
-
def defaultCompileSDKVersion = 35
|
|
2
|
-
def defaultBuildToolsVersion = '35.0.0'
|
|
3
|
-
def defaultMinSDKVersion = 21
|
|
4
|
-
def defaultTargetSDKVersion = 35
|
|
5
|
-
|
|
6
|
-
def getRootProjectProperty(property, fallback) {
|
|
7
|
-
rootProject.ext.has(property) ? rootProject.ext.get(property) : fallback
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
def overrideGmsVersion = getRootProjectProperty('overrideGmsVersion', '')
|
|
11
|
-
def overrideFirebaseVersion = getRootProjectProperty('overrideFirebaseVersion', '')
|
|
12
|
-
def overrideKotlinVersion = getRootProjectProperty('overrideKotlinVersion', '')
|
|
13
|
-
def withCryptorMigration = getRootProjectProperty('withCryptorMigration', false)
|
|
14
|
-
def withWebRTCUI = getRootProjectProperty('withWebRTCUI', false)
|
|
15
1
|
|
|
16
2
|
apply plugin: 'com.android.library'
|
|
3
|
+
apply plugin: 'kotlin-android'
|
|
17
4
|
apply plugin: 'maven-publish'
|
|
18
5
|
|
|
6
|
+
def isNewArchitectureEnabled() {
|
|
7
|
+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (isNewArchitectureEnabled()) {
|
|
11
|
+
apply plugin: 'com.facebook.react'
|
|
12
|
+
react {
|
|
13
|
+
jsRootDir = file("../src/specs")
|
|
14
|
+
libraryName = "MobileMessaging"
|
|
15
|
+
codegenJavaPackageName = "org.infobip.reactlibrary.mobilemessaging"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
19
|
buildscript {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
content {
|
|
32
|
-
excludeGroup "com.facebook.react"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
dependencies {
|
|
37
|
-
classpath 'com.android.tools.build:gradle:8.5.2'
|
|
38
|
-
}
|
|
20
|
+
ext {
|
|
21
|
+
kotlin_version = '2.1.20'
|
|
22
|
+
}
|
|
23
|
+
repositories {
|
|
24
|
+
google()
|
|
25
|
+
mavenLocal()
|
|
26
|
+
mavenCentral()
|
|
27
|
+
}
|
|
28
|
+
dependencies {
|
|
29
|
+
classpath 'com.android.tools.build:gradle:8.11.1'
|
|
30
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25"
|
|
39
31
|
}
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
def overrideGmsVersion = rootProject.findProperty('overrideGmsVersion') ?: ''
|
|
35
|
+
def overrideFirebaseVersion = rootProject.findProperty('overrideFirebaseVersion') ?: ''
|
|
36
|
+
def withWebRTCUI = rootProject.findProperty('withWebRTCUI') ?: false
|
|
44
37
|
|
|
45
38
|
android {
|
|
46
39
|
namespace "org.infobip.reactlibrary.mobilemessaging"
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
compileSdk 35
|
|
41
|
+
|
|
49
42
|
defaultConfig {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
minSdk 21
|
|
44
|
+
targetSdk 35
|
|
45
|
+
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
46
|
+
consumerProguardFiles 'infobip-mm-proguard-rules.pro'
|
|
54
47
|
}
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
sourceSets {
|
|
50
|
+
main {
|
|
51
|
+
if (isNewArchitectureEnabled()) {
|
|
52
|
+
java.srcDirs += ["src/newarchitecture"]
|
|
53
|
+
} else {
|
|
54
|
+
java.srcDirs += ["src/oldarchitecture"]
|
|
55
|
+
}
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
lintOptions {
|
|
64
|
-
abortOnError false
|
|
65
|
-
}
|
|
66
58
|
}
|
|
67
59
|
|
|
68
60
|
repositories {
|
|
69
|
-
|
|
70
|
-
maven {
|
|
71
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
72
|
-
url "$rootDir/../node_modules/react-native/android"
|
|
73
|
-
}
|
|
74
|
-
maven {
|
|
75
|
-
// Android JSC is installed from npm
|
|
76
|
-
url "$rootDir/../node_modules/jsc-android/dist"
|
|
77
|
-
}
|
|
78
|
-
mavenCentral {
|
|
79
|
-
// We don't want to fetch react-native from Maven Central as there are
|
|
80
|
-
// older versions over there.
|
|
81
|
-
content {
|
|
82
|
-
excludeGroup "com.facebook.react"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
61
|
+
maven { url "$rootDir/../node_modules/react-native/android" }
|
|
62
|
+
maven { url "$rootDir/../node_modules/jsc-android/dist" }
|
|
85
63
|
google()
|
|
64
|
+
mavenCentral()
|
|
86
65
|
mavenLocal()
|
|
87
66
|
}
|
|
88
67
|
|
|
89
68
|
dependencies {
|
|
90
69
|
def mmVersion = '14.6.2'
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$overrideKotlinVersion")
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
implementation 'com.facebook.react:react-native:+'
|
|
98
|
-
implementation "androidx.annotation:annotation:1.1.0"
|
|
70
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.20"
|
|
71
|
+
compileOnly "com.facebook.react:react-android"
|
|
72
|
+
implementation "androidx.annotation:annotation:1.9.1"
|
|
99
73
|
|
|
100
74
|
implementation 'com.google.android.material:material:1.12.0'
|
|
101
|
-
implementation 'androidx.exifinterface:exifinterface:1.
|
|
102
|
-
implementation 'androidx.databinding:viewbinding:8.0
|
|
103
|
-
implementation 'com.google.android.gms:play-services-base:18.2
|
|
75
|
+
implementation 'androidx.exifinterface:exifinterface:1.4.1'
|
|
76
|
+
implementation 'androidx.databinding:viewbinding:8.13.0'
|
|
77
|
+
implementation 'com.google.android.gms:play-services-base:18.7.2'
|
|
104
78
|
|
|
105
79
|
implementation "com.infobip:infobip-mobile-messaging-android-resources:$mmVersion@aar"
|
|
106
80
|
implementation "com.infobip:infobip-mobile-messaging-android-chat-sdk:$mmVersion@aar"
|
|
107
81
|
implementation "com.infobip:infobip-mobile-messaging-android-inbox-sdk:$mmVersion@aar"
|
|
108
|
-
implementation
|
|
82
|
+
implementation("com.infobip:infobip-mobile-messaging-android-sdk:$mmVersion@aar") {
|
|
109
83
|
transitive = true;
|
|
110
84
|
|
|
111
85
|
if (!overrideGmsVersion.empty) {
|
|
@@ -126,9 +100,4 @@ dependencies {
|
|
|
126
100
|
if (!overrideFirebaseVersion.empty) {
|
|
127
101
|
implementation "com.google.firebase:firebase-messaging:$overrideFirebaseVersion"
|
|
128
102
|
}
|
|
129
|
-
|
|
130
|
-
if (withCryptorMigration.toBoolean()) {
|
|
131
|
-
implementation "com.infobip:infobip-mobile-messaging-android-cryptor-migration:$mmVersion@aar"
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
}
|
|
103
|
+
}
|
package/android/gradlew
CHANGED
|
File without changes
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
-keep class org.infobip.reactlibrary.mobilemessaging.Configuration* { *; }
|
|
14
14
|
-keep class org.infobip.reactlibrary.mobilemessaging.Configuration$* { *; }
|
|
15
15
|
-keep class org.infobip.reactlibrary.mobilemessaging.CacheManager* { *; }
|
|
16
|
-
-keep class org.infobip.reactlibrary.mobilemessaging.ChatCustomization* { *; }
|
|
17
|
-
-keep class org.infobip.reactlibrary.mobilemessaging.ChatCustomization$* { *; }
|
|
18
16
|
|
|
19
17
|
# InfobipRtcUi classes that are accessed via reflection
|
|
20
18
|
-keep class com.infobip.webrtc.ui.InfobipRtcUi$Builder { *; }
|
|
@@ -22,6 +20,20 @@
|
|
|
22
20
|
-keep class com.infobip.webrtc.ui.ErrorListener { *; }
|
|
23
21
|
-keep class com.infobip.webrtc.ui.InfobipRtcUi { *; }
|
|
24
22
|
|
|
23
|
+
# Keep all classes that extend android.content.BroadcastReceiver
|
|
24
|
+
-keep public class * extends android.content.BroadcastReceiver {
|
|
25
|
+
public <init>(...);
|
|
26
|
+
public void onReceive(android.content.Context, android.content.Intent);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Keep any inner classes inside BroadcastReceivers
|
|
30
|
+
-keepclassmembers class * extends android.content.BroadcastReceiver {
|
|
31
|
+
<fields>;
|
|
32
|
+
<methods>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
# Prevent warnings for missing manifest entries (optional)
|
|
36
|
+
-dontwarn android.content.BroadcastReceiver
|
|
25
37
|
|
|
26
38
|
# Application classes that are used by native MM SDK
|
|
27
39
|
|
|
@@ -54,12 +54,18 @@
|
|
|
54
54
|
<receiver android:name="org.infobip.mobile.messaging.interactive.notification.NotificationActionTapReceiver"
|
|
55
55
|
android:exported="false"/>
|
|
56
56
|
|
|
57
|
-
<receiver android:name="org.infobip.reactlibrary.mobilemessaging.
|
|
58
|
-
|
|
57
|
+
<receiver android:name="org.infobip.reactlibrary.mobilemessaging.MessageEventReceiver"
|
|
58
|
+
android:exported="false">
|
|
59
59
|
<intent-filter>
|
|
60
60
|
<action android:name="org.infobip.mobile.messaging.MESSAGE_RECEIVED" />
|
|
61
61
|
<action android:name="org.infobip.mobile.messaging.NOTIFICATION_TAPPED" />
|
|
62
62
|
<action android:name="org.infobip.mobile.messaging.interactive.NOTIFICATION_ACTION_TAPPED" />
|
|
63
|
+
</intent-filter>
|
|
64
|
+
</receiver>
|
|
65
|
+
|
|
66
|
+
<receiver android:name="org.infobip.reactlibrary.mobilemessaging.RNMMChatEventReceiver"
|
|
67
|
+
android:exported="false">
|
|
68
|
+
<intent-filter>
|
|
63
69
|
<action android:name="org.infobip.mobile.messaging.chat.UNREAD_MESSAGES_COUNTER_UPDATED"/>
|
|
64
70
|
</intent-filter>
|
|
65
71
|
</receiver>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ConfigCache.kt
|
|
3
|
+
// MobileMessagingReactNative
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2025 Infobip Limited
|
|
6
|
+
// Licensed under the Apache License, Version 2.0
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
package org.infobip.reactlibrary.mobilemessaging
|
|
10
|
+
|
|
11
|
+
import kotlin.jvm.JvmField
|
|
12
|
+
|
|
13
|
+
object ConfigCache {
|
|
14
|
+
@JvmField var configuration: Configuration? = null
|
|
15
|
+
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Configuration.java
|
|
3
|
+
// MobileMessagingReactNative
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2025 Infobip Limited
|
|
6
|
+
// Licensed under the Apache License, Version 2.0
|
|
7
|
+
//
|
|
8
|
+
|
|
1
9
|
package org.infobip.reactlibrary.mobilemessaging;
|
|
2
10
|
|
|
3
11
|
import androidx.annotation.NonNull;
|
|
@@ -12,7 +20,7 @@ import java.util.ArrayList;
|
|
|
12
20
|
import java.util.List;
|
|
13
21
|
import java.util.Map;
|
|
14
22
|
|
|
15
|
-
class Configuration {
|
|
23
|
+
public class Configuration {
|
|
16
24
|
|
|
17
25
|
class AndroidConfiguration {
|
|
18
26
|
String notificationIcon;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// PermissionsRequestManager.java
|
|
3
|
+
// MobileMessagingReactNative
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2016-2025 Infobip Limited
|
|
6
|
+
// Licensed under the Apache License, Version 2.0
|
|
7
|
+
//
|
|
8
|
+
|
|
1
9
|
package org.infobip.reactlibrary.mobilemessaging;
|
|
2
10
|
|
|
3
11
|
import android.app.Activity;
|