rns-nativecall 0.4.3 → 0.4.4

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.
@@ -68,4 +68,7 @@ dependencies {
68
68
  // Glide for profile pictures
69
69
  implementation "com.github.bumptech.glide:glide:4.15.1"
70
70
  annotationProcessor "com.github.bumptech.glide:compiler:4.15.1"
71
+
72
+ implementation "androidx.core:core-ktx:1.12.0"
73
+ implementation "androidx.appcompat:appcompat:1.6.1"
71
74
  }
@@ -25,8 +25,8 @@ class CallHeadlessTask : HeadlessJsTaskService() {
25
25
  }
26
26
 
27
27
  val notification: Notification = NotificationCompat.Builder(this, channelId)
28
- .setContentTitle("Incoming Call")
29
- .setSmallIcon(android.R.drawable.sym_call_incoming)
28
+ .setContentTitle("")
29
+ // .setSmallIcon(android.R.drawable.sym_call_incoming)
30
30
  .setPriority(NotificationCompat.PRIORITY_LOW)
31
31
  .build()
32
32
 
@@ -11,6 +11,9 @@ import android.media.Ringtone
11
11
  import android.media.RingtoneManager
12
12
  import android.graphics.Color
13
13
 
14
+ import androidx.core.app.Person
15
+ import androidx.core.app.NotificationCompat.CallStyle
16
+
14
17
  object NativeCallManager {
15
18
 
16
19
  private var ringtone: Ringtone? = null
@@ -20,7 +23,7 @@ object NativeCallManager {
20
23
  val uuid = data["callUuid"] ?: return
21
24
  stopRingtone()
22
25
 
23
- val name = data["name"] ?: "Incoming Call"
26
+ val name = data["name"] ?: "Someone"
24
27
  val callType = data["callType"] ?: "audio"
25
28
 
26
29
  val pendingFlags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
@@ -52,7 +55,7 @@ object NativeCallManager {
52
55
  val channel = NotificationChannel(CALL_CHANNEL_ID, "Incoming Call", NotificationManager.IMPORTANCE_HIGH).apply {
53
56
  setBypassDnd(true)
54
57
  lockscreenVisibility = NotificationCompat.VISIBILITY_PUBLIC
55
- enableVibration(true) //can be removed
58
+ enableVibration(false) //can be removed
56
59
  setSound(null, null)
57
60
  }
58
61
  notificationManager.createNotificationChannel(channel)
@@ -71,8 +74,10 @@ object NativeCallManager {
71
74
  .setFullScreenIntent(fullScreenPendingIntent, false) //can be true
72
75
  .addAction(0, "Answer", fullScreenPendingIntent)
73
76
  .addAction(0, "Decline", rejectPendingIntent)
74
-
75
- notificationManager.notify(uuid.hashCode(), builder.build())
77
+ .setColor(Color.parseColor("#28a745")) // Green color for the "Pill"
78
+ .setColorized(true)
79
+
80
+ notificationManager.notify(uuid.hashCode(), builder.build())
76
81
 
77
82
  try {
78
83
  val ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "RNS nativecall component with native Android/iOS for handling native call ui, when app is not open or open.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",