@qusaieilouti99/call-manager 0.1.5 → 0.1.6

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.
@@ -43,6 +43,17 @@ class CallManagerModule(reactContext: ReactApplicationContext) :
43
43
  // 1. Report incoming call
44
44
  override fun reportIncomingCall(callId: String, callData: String) {
45
45
  Log.d(TAG, "reportIncomingCall called with callId=$callId, callData=$callData")
46
+ // Parse caller name from callData (or use a default)
47
+ val callerName = try {
48
+ val json = org.json.JSONObject(callData)
49
+ json.optString("name", "Unknown")
50
+ } catch (e: Exception) {
51
+ "Unknown"
52
+ }
53
+
54
+ // Show incoming call notification and play ringtone
55
+ notificationHelper.showIncomingCallNotification(callId, callerName)
56
+
46
57
  val context = reactApplicationContext
47
58
  val telecomManager = context.getSystemService(Context.TELECOM_SERVICE) as TelecomManager
48
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",