@qusaieilouti99/call-manager 0.1.140 → 0.1.142
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.
|
@@ -118,6 +118,11 @@ object CallEngine {
|
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Get the application context. Returns null if not initialized.
|
|
123
|
+
*/
|
|
124
|
+
fun getContext(): Context? = appContext
|
|
125
|
+
|
|
121
126
|
fun setEventHandler(handler: ((CallEventType, String) -> Unit)?) {
|
|
122
127
|
Log.d(TAG, "setEventHandler called. Handler present: ${handler != null}")
|
|
123
128
|
eventHandler = handler
|
|
@@ -119,12 +119,12 @@ class CallManager : HybridCallManagerSpec() {
|
|
|
119
119
|
Log.d(TAG, "reportIncomingCall requested: callId=$callId, callType=$callType, targetName=$targetName")
|
|
120
120
|
ensureInitialized()
|
|
121
121
|
CallEngine.reportIncomingCall(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
requireNotNull(CallEngine.getContext()) { "CallEngine must be initialized with context" },
|
|
123
|
+
callId,
|
|
124
|
+
callType,
|
|
125
|
+
targetName,
|
|
126
|
+
null,
|
|
127
|
+
metadata
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
130
|
}
|