I would like to send sms by SmsManager its working but in first sim i have no balance in this case sms failed. so how to send sms by second sim only from my application. other app like whatsApp send msg at reg time from my second sim if not availible balance in first sim.so i think its possible. pls help me
String mobileNo = phoneNumber1.getText().toString();
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(mobileNo, null, "BAL", null, null);
Toast.makeText(getApplicationContext(), "SMS Sent!",
Toast.LENGTH_LONG).show();
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS faild, please try again later!",
Toast.LENGTH_LONG).show();
e.printStackTrace();
}