Mohammad Aamir
Mohammad Aamir

Reputation: 531

Link in SMS from android app

I want to send a link in SMS from my android application. I am able to do so. But whole body doesn't reflect as a link. Part of SMS is not shown as a link. Any help how to do so in android app.

SmsManager smsManager = SmsManager.getDefault();
selectedSMSMessage = "http://www.mydeeplink.com?SignInId=" + SignIn.userid;

smsManager.sendTextMessage(selectedContact, null, selectedSMSMessage, null, null);
Toast.makeText(getActivity(), "Message Sent",
        Toast.LENGTH_LONG).show();

Upvotes: 1

Views: 128

Answers (1)

Joif
Joif

Reputation: 33

Try this

public static void main(String[] args) {

    String id = SignIn.userid;

    String trimmedID = id.trim();

    String selectedSMSMessage = "http://www.mydeeplink.com?SignInId=" + trimmedID;

}

Upvotes: 1

Related Questions