I'm trying to do the following in my application:
Basically, my goal is that users will be able to share my app with their friends( for this example I used google link).
I tried to do the following but it didn't work:
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "I really liked the app! you should try it too =) \n\n" + getResources().getString( R.string.ActivityProfile_ShareMessage ));
sendIntent.setType("text/plain");
Intent shareIntent = Intent.createChooser(sendIntent, null);
startActivity(shareIntent);
Where
<string name="ActivityProfile_ShareMessage">![CDATA[via <a href="http://google.com">Download the app from the Play Store</a>]]</string>
But it just gave me a text and not a link and without any preview like shown in the image.
Any way to do it?
Also, I saw that there are solutions that work either for email or WhatsApp. Isn't there a solution for both? For example, text/html
won't work for messages and so on.
Thank you