Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Share via whatsapp

$
0
0

How do you properly encode a message to share via the whatsapp URL scheme ? The following set the text in whatsapp with whitespaces replaced by ' - ', offcourse i don't want that.

Example:

            try{
                // text with spaces
                var textString = "   Hello World   " ;

                NSUrl request = new NSUrl("whatsapp://send?text=" + textString);

                UIApplication.SharedApplication.OpenUrl(request);
            } catch (Exception ex) {
                var alertView = new UIAlertView("Error", "Something went wrong", null, "OK", null);
                alertView.Show();
            }

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>