2

i want an automatic mail filled in when i click on the email address. but for some reason the html <-a href="link">here<-/a> doesn't works. here is my code, hopefully somebody has some experience with this in android.

here is my code in my onclicklistener:

 String link="http://www.thisisthelink.com";
            String body=
                    "following link:<a href="+link+">hier</a>";

            Intent email = new Intent(Intent.ACTION_SEND);
            email.putExtra(Intent.EXTRA_EMAIL, new String[]{current.getOuder_email()});
            email.putExtra(Intent.EXTRA_SUBJECT, "SUBJECT");
            email.putExtra(Intent.EXTRA_TEXT, Html.fromHtml(body));
            email.setType("message/rfc822");
            startActivityForResult(Intent.createChooser(email, "Email"),1);
Peter
  • 275
  • 1
  • 2
  • 9

1 Answers1

0

You can try to read about Spannable and especially Clickable Span. Take a look at similar question this might help you.

Anton Kazakov
  • 2,740
  • 3
  • 23
  • 34