Activity Popup and Whatsapp

Hi all,

I’m trying to use the Activity Popup to share a text via Whatsapp and I’m having a problem that though apparently small really makes my life difficult.

What happens is that the “string” I’m sharing contains new lines characters which are not present in the message that gets through the activity popup on Whatsapp.

For example it the string is “Here’s my shopping list:\n2kg bread\n7 nutella jars\n4 apples” I want to get:

Here’s my shopping list:

2kg bread

7 nutella jars

4 apples

instead I get:

Here’s my shopping list: 2kg bread 7 nutella jars 4 apples

Curiously this doesn’t happen if I choose another activity, like Messages or E-mail and the string gets through correctly.

It is also worth mentioning that if I use the Whatsapp Activity Popup from another app (eg from Notes) shared messages do get to Whatsapp with new lines in the correct place, so apparently it is not a limitation of the Whatsapp extension.

Is there any workaround to this or a special way to encode new lines for this purpose?

Thanks in advance for any help!

@sparklinglabs, are you testing this on iOS or Android? Which version of Corona are you building with?

This is strictly iOS related for the Activity Popup and I’m testing on iOS 9.0.2

I’m using Corona Enterprise 2015.2627

I’d actually would appreciate if someone could test on a different setup/version and tell how it works!

Edit: I can add that sharing via Whatsapp on Android with the social popup works like a charm and I’m actually able to share strings with new lines.

You might be running into the problem referenced in the below forum thread:

https://forums.coronalabs.com/topic/59464-displaynewtext-broken

Since you’re just passing strings, one would presume the issues are similar, but you would be best served to evaluate and see if your bug relates to their bug.

@sparklinglabs, are you testing this on iOS or Android? Which version of Corona are you building with?

This is strictly iOS related for the Activity Popup and I’m testing on iOS 9.0.2

I’m using Corona Enterprise 2015.2627

I’d actually would appreciate if someone could test on a different setup/version and tell how it works!

Edit: I can add that sharing via Whatsapp on Android with the social popup works like a charm and I’m actually able to share strings with new lines.

You might be running into the problem referenced in the below forum thread:

https://forums.coronalabs.com/topic/59464-displaynewtext-broken

Since you’re just passing strings, one would presume the issues are similar, but you would be best served to evaluate and see if your bug relates to their bug.