• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps SMS Intent does not work with contact having number with spaces

TienDat

Lurker
Dear all,

We are using Intent to start an activity on SMS default app of android.
We noticed that if we send to multiple recipients, the recipient with number having spaces will be dropped.
If we send to only one recipient, it still works.

Here is how we build the intent:
final Uri uri = Uri.parse("smsto:" + stringOfMultipleNumbers);
Intent smsIntent = new Intent(Intent.ACTION_SENDTO, uri);
smsIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
smsIntent.putExtra("sms_body", messageContent);

For instance, stringOfMultipleNumbers is "0123456787;0123456788;01 23 45 67 89"

For multiple recipient, we need to separate numbers by ";" and it is working fine with all numbers which do not have spaces.

Do you have the same issue? Do you know what is the solution? Could you please enlighten us?

Best regards
Tien Dat PHAN
 
Back
Top Bottom