Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send link with custom scheme through Gmail

I'm trying to send a deep link that opens my Android app:

String body = "<a href=\'myscheme://myurl?Id=37\'>Link to simulation</a>";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "share");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
startActivity(Intent.createChooser(emailIntent, "Email:"));

But when I got the email with the code above and with my Gmail through desktop chrome brower I got only plain text.
When I send http://myurl I do get the link.

Is it possible to send link with custom scheme?

like image 306
NickF Avatar asked Oct 29 '25 05:10

NickF


1 Answers

Use tinyurl api to generate short link http://tinyurl.com/api-create.php?url=myscheme://myurl?Id=37 you get http://tinyurl.com/ofmudsw

like image 138
Devid G Avatar answered Oct 30 '25 21:10

Devid G



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!