Send sms using sim selection option

前端 未结 3 1473
栀梦
栀梦 2021-01-16 19:24

I have tried Android SDK above 5.1 OS. I want to send sms using SIM selection option. I tried this Program. It\'s taking sim1 only. It does not take second sim.

3条回答
  •  难免孤独
    2021-01-16 20:28

    That is because you have:

    SmsManager.getDefault()
    

    which is SIM1, instead of having:

    SmsManager.getSmsManagerForSubscriptionId(int subscriptionId)
    

    when sending SMS in your dialog buttons click events.

提交回复
热议问题