react-native-move-sdk 2.10.1 → 2.10.2

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.
@@ -1,52 +0,0 @@
1
- package `in`.dolph.move.sdk
2
-
3
- import android.app.NotificationChannel
4
- import android.app.NotificationManager
5
- import android.content.Context
6
- import android.content.Context.NOTIFICATION_SERVICE
7
- import androidx.core.app.NotificationCompat
8
- import io.dolphin.move.MoveNotification
9
-
10
- data class MoveNotificationConfig(
11
- var title: String,
12
- var text: String,
13
- var icon: Int?,
14
- var channelId: String,
15
- var channelName: String,
16
- var channelDescription: String
17
- ) {
18
-
19
- fun toAndroidNotification(context: Context): NotificationCompat.Builder {
20
- createChannel(context)
21
- // TODO: Host app should decide on icon
22
- return NotificationCompat.Builder(context, this.channelId)
23
- .setSmallIcon(R.drawable.ic_notification)
24
- .setContentTitle(this.title)
25
- .setContentText(this.text)
26
- .setChannelId(this.channelId)
27
- .setSound(null)
28
- .setSilent(true)
29
- .setPriority(NotificationCompat.PRIORITY_MAX);
30
- }
31
-
32
- fun toMoveNotification(context: Context): MoveNotification {
33
- createChannel(context)
34
- return MoveNotification(
35
- channelId = channelId,
36
- contentText = text,
37
- contentTitle = title,
38
- drawableId = icon ?: R.drawable.ic_notification,
39
- showWhen = false,
40
- )
41
- }
42
-
43
- private fun createChannel(context: Context) {
44
- // Create the NotificationChannel
45
- val importance = NotificationManager.IMPORTANCE_DEFAULT
46
- val channel = NotificationChannel(channelId, channelName, importance)
47
- channel.description = channelDescription
48
- val notificationManager =
49
- context.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
50
- notificationManager.createNotificationChannel(channel)
51
- }
52
- }
@@ -1,13 +0,0 @@
1
- package `in`.dolph.move.sdk
2
-
3
- import io.dolphin.move.MoveAuth
4
- import io.dolphin.move.MoveDetectionService
5
-
6
- data class MoveSdkConfig(
7
- val auth: MoveAuth,
8
- // not used for now
9
- val timelineDetectionServices: List<MoveDetectionService>,
10
- val tripNotification: MoveNotificationConfig,
11
- val recognitionNotification: MoveNotificationConfig,
12
- val walkingNotification: MoveNotificationConfig,
13
- )