It seems to be an easy procedure, but is giving me a huge headache.
I have in my app a button to share the URL of the post you are on the screen. The URL is stored in the variable strUrl.
I do all the standard procedure:
Intent I = new Intent(Intent.ACTION_SEND);
I.setType("text/plain");
I.putExtra(android.content.Intent.EXTRA_TEXT, Uri.parse(strUrl));
startActivity(Intent.createChooser(I,"Share with..."));
By clicking the button, the menu usually features Android applications to choose which one to share. Choose those who have interest: Twitter, Facebook, Email, etc ...
However, when you open the screen app, Facebook for example, the screen again post without containing the URL that I tried to share through my application. I tried writing a normal message, but this did not appear.
I.putExtra(android.content.Intent.EXTRA_TEXT, "some text here");
I realize that something is very wrong. The problem is repeated in all the applications that I try to share through my application.
I'm testing on Android 2.3 and 4.2.2
I ask here apologize for my English level, I'm Brazilian and I'm using Google translator to take this course.
Try
intent.putExtra(Intent.EXTRA_TEXT, strUrl);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With