forked from upstream-mirrors/quik
Add support for Android 5.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.klinker.android.send_message
|
||||
|
||||
import android.os.Build
|
||||
import android.telephony.SmsManager
|
||||
|
||||
object SmsManagerFactory {
|
||||
@@ -9,7 +10,7 @@ object SmsManagerFactory {
|
||||
fun createSmsManager(subscriptionId: Int): SmsManager {
|
||||
var manager: SmsManager? = null
|
||||
|
||||
if (subscriptionId != -1) {
|
||||
if (subscriptionId != -1 && Build.VERSION.SDK_INT >= 22) {
|
||||
try {
|
||||
manager = SmsManager.getSmsManagerForSubscriptionId(subscriptionId)
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user