bring app to front when call is coming in
This commit is contained in:
@@ -4,10 +4,7 @@ import android.Manifest
|
|||||||
import android.app.Notification.VISIBILITY_PUBLIC
|
import android.app.Notification.VISIBILITY_PUBLIC
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.content.BroadcastReceiver
|
import android.content.*
|
||||||
import android.content.Context
|
|
||||||
import android.content.Intent
|
|
||||||
import android.content.IntentFilter
|
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
@@ -842,7 +839,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
am.mode = AudioManager.MODE_RINGTONE
|
am.mode = AudioManager.MODE_RINGTONE
|
||||||
// am.isSpeakerphoneOn = true
|
val i = Intent(this, MainActivity::class.java)
|
||||||
|
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
|
||||||
|
startActivity(i);
|
||||||
}
|
}
|
||||||
"call verify" -> {
|
"call verify" -> {
|
||||||
val call = Call.find(calls, callp)
|
val call = Call.find(calls, callp)
|
||||||
@@ -935,7 +934,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (call.dir == "in") {
|
if (call.dir == "in") {
|
||||||
Log.d("Baresip", "Removing inbound call $uap / $callp / " +
|
Log.d("Baresip", "Removing inbound call ${uap}/${callp}/" +
|
||||||
call.peerURI)
|
call.peerURI)
|
||||||
val inIndex = Call.index(calls, call, "in")
|
val inIndex = Call.index(calls, call, "in")
|
||||||
val view_id = (inIndex + 1) * 10
|
val view_id = (inIndex + 1) * 10
|
||||||
|
|||||||
Reference in New Issue
Block a user