react-native-sms icon indicating copy to clipboard operation
react-native-sms copied to clipboard

Multiple recipients don't display correctly in Android

Open levibotelho opened this issue 8 years ago • 8 comments

Not sure if this is a problem with Android or the lib, but figured I'd bring this up.

If I create an SMS to two recipients in Android, my screen looks like this:

image

However if I create an SMS to two recipients via the lib, I get this:

image

Notice how only the last recipient is shown. This is what the "People & Options" menu looks like:

image

It appears that both numbers are being added (hence the block text) but that only the last is taken into account (hence the "people in this conversation" list). I'm not testing this on an actual device yet so I don't know if it's just a display issue or if the SMS will actually only be sent to the second recipient, but at the very least this could be confusing for the user from a UX standpoint.

levibotelho avatar Nov 18 '17 08:11 levibotelho

Looking a bit more deeply into this it might be due to the device I'm on (Pixel 1 emulator). Not sure if it just requires a comma separator or if it's simply not possible on this device. Can investigate further if you want help...

levibotelho avatar Nov 18 '17 09:11 levibotelho

Hi @levibotelho, were you able to find a potential solution or reason for this behavior?

tkporter avatar Jan 12 '18 01:01 tkporter

No. Poked around a bit and might just have to live with it... might be a device-dependent thing...

levibotelho avatar Jan 12 '18 07:01 levibotelho

Have the same problem with devices on android 8.

Gazfay avatar Oct 31 '18 11:10 Gazfay

Check it - https://github.com/Gazfay/react-native-sms/blob/master/android/src/main/java/com/tkporter/sendsms/SendSMSModule.java

Gazfay avatar Nov 05 '18 11:11 Gazfay

@Gazfay Just saw that you hooray'd my post - I'm actually reporting that there's still a bug: when you send a message to multiple recipients, the "success" status doesn't go through and you just get "cancelled" when you return to the app. (I'll delete previous replies for clarity.)

dancherb avatar Jan 15 '19 08:01 dancherb

Tried this on Nexus 6 and Pixel 2 XL emulator and it can't take multiple recipients.

String separator = ";";
                if(android.os.Build.MANUFACTURER.equalsIgnoreCase("Samsung")){
                    separator = ",";
                }

is the issue. To work the deliminator needs to be a "," instead of a semi-colon.

Code works fine on Nokia 7 device.

ashleypeacock avatar Feb 06 '20 14:02 ashleypeacock

@ashleypeacock nice find! Would you be able to open up a PR with that change?

tkporter avatar Feb 06 '20 20:02 tkporter