sirineAyat sirineAyat - 2 months ago 7
Android Question

my receive SMS application show a URL as a text message

i am developing a receive SMS application i am able to receive the SMS but my app shows URL as a text message so i can't click on it
so i need it to display it as a URL so any idea to help me do it

this is how the URL look like

thank you in advance

Answer

Quoting this answer from a similar post:

Just use an HTML format link in your resource:

<string name="my_link"><a href="http://somesite.com/">Click
> me!</a></string>

You can then

usesetMovementMethod(LinkMovementMethod.getInstance())

 on

your TextView to make the link clickable.

There is also TextView'sandroid:autoLink attribute which should also work

Just let me know if you have further doubts

Comments