make certain text from sms able to pop up copy option on android

608 Views Asked by At

I send sms using java with smslib library, that contain code that i want to copy when sms received from my android device.

here is my code

String stringMessage = "code : xxxxxxyyyyyzzzzzz \n"
                            + "any question : http:/sitamvan.com";

String number = "08888888888";

OutboundMessage msg = new OutboundMessage(number, stringMessage);
Service.getInstance().sendMessage(msg);

for example the text on the sms will be like this

code : xxxxxxyyyyyzzzzzz
any question : http:/sitamvan.com

when i received the sms (i opened it with default sms app), the url is blue in color and can be copied just by tap on it and the copy option will be popped up.

is it possible to make my code blue in color too? so the default sms app read my code as some copyable text just like when number or link is present on it? may be by adding some text or enclose it with apostrophe?

0

There are 0 best solutions below