anarchicknight/react-native-communications

text message cut off

dwilt opened this issue · 3 comments

dwilt commented

I am trying to post a long message into a text message:

Communications.text(null, 'This is what I’m reading on Great Jones Street (the Netflix of short fiction): Small Bang Only by Geeta Kothari http://dantest.gjs.press/zjZr/xleaXvYzix?action=story-detail&storyId=3&storyTitle=Small%20Bang%20Only%20-%20Geeta%20Kothari&referring_user_id=3BFC85F3-EC6A-46A1-BEDF-2758EE209985&share_medium=SMS');

but what's interesting is that it cuts off the string of text to this:
This is what I’m reading on Great Jones Street (the Netflix of short fiction): Small Bang Only by Geeta Kothari http://dantest.gjs.press/zjZr/xleaXvYzix?action=story-detail

Is there something about the & that causes it to break or is there some char limit? Being that string if 172 characters long - that would be a pretty random number to have it set to so I'm imagining it's the & in the url.. any ideas?

Will work on this later today. It will be the & and it not being encoded. Covered these cases in the email method but not the text somehow :(

this should be resolved in 2.1.3

Turned out to be a bit trickier than expected. Fixed in iOS easily by encoding the string but Android for some reason had to have it double encoded.

Will close this but reopen if for some reason it does not fix it for you

dwilt commented

Got it, seems to be fixed in iOS. Will let you know if it's not in Android.

Thank you for the quick turnaround! Also glad to see I can now import methods individually:

import {
    email as sendEmail,
    text as sendSMS
} from 'react-native-communications';