Skip to content

Commit

Permalink
Updates Android SDK to 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adam1929 authored Apr 4, 2023
1 parent 0714fe7 commit 9f41dec
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+' // From node_modules
implementation 'com.exponea.sdk:sdk:3.4.0'
implementation 'com.exponea.sdk:sdk:3.5.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
Expand Down
9 changes: 9 additions & 0 deletions documentation/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
# Configuration
Before using most of the SDK functionality, you'll need to configure Exponea to connect it to backend application.

> **NOTE:** Using of some API is allowed before SDK initialization in case that previous initialization process was done.
> These API methods are TUNAK:
> - ExponeaModule.Companion.handleCampaignIntent
> - ExponeaModule.Companion.handleRemoteMessage
> - ExponeaModule.Companion.handleNewToken
> - ExponeaModule.Companion.handleNewHmsToken
>
> In such a case, method will track events with configuration of last SDK initialization.
> You can find your credentials in [Exponea web application](./EXPONEA_CONFIGURATION.md)
Minimal required configuration is simple:
Expand Down
2 changes: 2 additions & 0 deletions documentation/LINKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ public class MainActivity extends ReactActivity {
}
}
```

> **NOTE:** Calling of `ExponeaModule.Companion.handleCampaignIntent` is allowed before SDK initialization in case that previous initialization process was done. In such a case, `ExponeaModule.Companion.handleCampaignIntent` will track events with configuration of last initialization. Please consider to do SDK initialization in `ReactActivity::onCreate` before SDK init in case of update of your application to apply a fresh new configuration.
4 changes: 4 additions & 0 deletions documentation/PUSH_ANDROID.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Registering in AndroidManifest.xml
</application>
...
```

> **NOTE:** Calling of `ExponeaModule.Companion.handleNewToken` and `ExponeaModule.Companion.handleRemoteMessage` is allowed before SDK initialization in case that previous initialization process was done. In such a case, methods will track events with configuration of last initialization. Please consider to do SDK initialization in `Application::onCreate` or before these methods in case of update of your application to apply a fresh new configuration.
### Setting the Firebase server key in the Exponea web app
You'll need to set the Firebase server key so Exponea can use it to send push notifications to your application. Our native Android has a [guide describing how to do so](https://github.com/exponea/exponea-android-sdk/blob/develop/Guides/FIREBASE.md).
Expand Down Expand Up @@ -139,6 +141,8 @@ Registering in AndroidManifest.xml
...
```

> **NOTE:** Calling of `ExponeaModule.Companion.handleNewHmsToken` and `ExponeaModule.Companion.handleRemoteMessage` is allowed before SDK initialization in case that previous initialization process was done. In such a case, methods will track events with configuration of last initialization. Please consider to do SDK initialization in `Application::onCreate` or before these methods in case of update of your application to apply a fresh new configuration.
### That's it
After these steps, you should be able to receive push notifications from Exponea. To learn how to send one, check a [Sending Push notifications guide](./PUSH_SEND.md).

Expand Down
2 changes: 2 additions & 0 deletions documentation/PUSH_IOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class NotificationService: UNNotificationServiceExtension {
}
```

> **NOTE:** Calling of `ExponeaNotificationService.process` is allowed before SDK initialization in case that previous initialization process was done. In such a case, methods will track events with configuration of last initialization. Please consider to do SDK initialization in `UIApplicationDelegate.application(application, didFinishLaunchingWithOptions)` or before this method in case of update of your application to apply a fresh new configuration.
### Notification Content Extension
Create new Notification Content Extension. By default the extension will contain storyboard file that you can delete, we'll change the default view controller implementation. Service extension that we created in the previous step will change the notification `categoryIdentifier` to `EXPONEA_ACTIONABLE`. We have to configure the content extension to display push notifications with that category. Open `Info.plist` in created content extension group and add `UNNotificationExtensionCategory`. Next, remove `NSExtensionMainStoryboard` and instead use `NSExtensionPrincipalClass` set to your view controller.
![](./images/extension3.png)
Expand Down
4 changes: 3 additions & 1 deletion documentation/VERSION_UPDATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ public class MessageService extends FirebaseMessagingService {
</service>
</application>
...
```
```

> **NOTE:** Calling of `ExponeaModule.Companion.handleNewToken`, `ExponeaModule.Companion.handleNewHmsToken` and `ExponeaModule.Companion.handleRemoteMessage` is allowed before SDK initialization in case that previous initialization process was done. In such a case, methods will track events with configuration of last initialization. Please consider to do SDK initialization in `Application::onCreate` or before these methods in case of update of your application to apply a fresh new configuration.
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ dependencies {
gmsImplementation 'com.google.firebase:firebase-messaging:23.0.0'
hmsImplementation 'com.huawei.agconnect:agconnect-core:1.5.2.300'
hmsImplementation 'com.huawei.hms:push:6.3.0.302'
implementation 'com.exponea.sdk:sdk:3.4.0'
implementation 'com.exponea.sdk:sdk:3.5.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'com.google.code.gson:gson:2.8.9'

Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ PODS:
- React-jsinspector (0.70.7)
- React-logger (0.70.7):
- glog
- react-native-exponea-sdk (1.3.0):
- react-native-exponea-sdk (1.3.1):
- AnyCodable-FlightSchool (= 0.4.0)
- ExponeaSDK (= 2.15.2)
- React-Core
Expand Down Expand Up @@ -610,7 +610,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: e95cdd036e7947ddf87f3049319ac3064deb76b5
React-jsinspector: 1c34fea1868136ecde647bc11fae9266d4143693
React-logger: e9f407f9fdf3f3ce7749ae6f88affe63e8446019
react-native-exponea-sdk: 571fb13376582d185d8b5fa1cff24d974889aacd
react-native-exponea-sdk: 59164afaf9094c007c813a8a40808db7e64665a0
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc
React-perflogger: 52a94f38c19a518d05726624b49bfc192639374d
React-RCTActionSheet: 7b89fe64a852bc3ae39b91dbd142ef09931ef3f7
Expand Down

0 comments on commit 9f41dec

Please sign in to comment.