Added email field to baresip contact
Added possibility to send email to contact and call or chat peer Added possibility to import contacts from vcf file to baresip contacts
This commit is contained in:
@@ -1406,13 +1406,19 @@ object Utils {
|
||||
|
||||
fun sendSms(ctx: Context, destination: String, message: String): Boolean {
|
||||
return try {
|
||||
val smsManager = if (Build.VERSION.SDK_INT >= 31) {
|
||||
val smsManager = if (Build.VERSION.SDK_INT >= 31)
|
||||
ctx.getSystemService(android.telephony.SmsManager::class.java)
|
||||
} else {
|
||||
else
|
||||
@Suppress("DEPRECATION")
|
||||
android.telephony.SmsManager.getDefault()
|
||||
}
|
||||
smsManager.sendTextMessage(destination, null, message, null, null)
|
||||
smsManager.sendTextMessage(
|
||||
destination,
|
||||
null,
|
||||
message,
|
||||
null,
|
||||
null
|
||||
)
|
||||
Log.d(TAG, "Sent SMS message to $destination")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to send SMS: ${e.message}")
|
||||
|
||||
Reference in New Issue
Block a user