I've been researching the subject, but I haven't seen any definitive solution to the problem. Well, my app sends SMS from the SmsManager but it doesn't ask which chip to use when running in a Dual Sim app, simply because I have no idea how to do that.
As far as I know, the second parameter of the
smsManager.sendTextMessage which is currently declared null is responsible for the Service Center (SMSC) that will be used for sending, which would result in the sending by the correct chip, in parts since the user you can have a cell phone with two chips from the same operator, using the same SMSC for both chips.
I checked the SmsManager documentation but there isn't even any information about usage on Dual Sim devices.
And here is my question: how to really use SMSManager in Dual Sim devices correctly, always asking which chip will be used for sending, or defining it in advance?
I believe this is a function chosen directly on the user's device.
It is possible to define which SIM will be the default for calls and SMS sending, to revoke this permission, on the device itself, do:
Configurações >> Wireless & Networks >> SIM Management >> Padrão Settings >> Messages >> e selecionar 'Perguntar sempre'.
With this, every time you send an SMS through an APP, you will be asked which SIM should be used.
Via code there is no way to disable the user's default choice.