@qusaieilouti99/call-manager 0.1.18 → 0.1.20
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.
|
@@ -20,6 +20,7 @@ class CallActivity : Activity() {
|
|
|
20
20
|
|
|
21
21
|
// Cancel the notification as soon as CallActivity is shown
|
|
22
22
|
CallEngine.cancelIncomingCallUI(this)
|
|
23
|
+
CallEngine.playRingtone(this)
|
|
23
24
|
|
|
24
25
|
val callerName = intent.getStringExtra("callerName") ?: "Unknown"
|
|
25
26
|
val nameView = findViewById<TextView>(R.id.caller_name)
|
|
@@ -43,6 +44,7 @@ class CallActivity : Activity() {
|
|
|
43
44
|
|
|
44
45
|
override fun onDestroy() {
|
|
45
46
|
super.onDestroy()
|
|
47
|
+
CallEngine.stopRingtone()
|
|
46
48
|
CallEngine.cancelIncomingCallUI(this)
|
|
47
49
|
CallEngine.stopForegroundService(this)
|
|
48
50
|
CallEngine.disconnectTelecomCall(this, intent.getStringExtra("callId") ?: "")
|
|
@@ -65,7 +65,7 @@ object CallEngine {
|
|
|
65
65
|
val declinePendingIntent = PendingIntent.getBroadcast(context, 1, declineIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
|
66
66
|
|
|
67
67
|
val fullScreenIntent = Intent(context, CallActivity::class.java).apply {
|
|
68
|
-
addFlags(Intent.
|
|
68
|
+
addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP)
|
|
69
69
|
putExtra("callId", callId)
|
|
70
70
|
putExtra("callerName", callerName)
|
|
71
71
|
}
|
|
@@ -96,7 +96,6 @@ object CallEngine {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
notificationManager.notify(NOTIF_ID, notification)
|
|
99
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) playRingtone(context)
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
fun cancelIncomingCallUI(context: Context) {
|