This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void openSMSClientWithData(@NotNull String phoneNumberWithCountryCode, | |
@NotNull String smsBody, | |
@NotNull Context contextForToastMessage) { | |
Uri smsUri = Uri.parse("smsto:" + phoneNumberWithCountryCode); | |
Intent smsIntent = new Intent(Intent.ACTION_SENDTO, smsUri); | |
smsIntent.putExtra("sms_body", smsBody); | |
try { | |
startActivity(smsIntent); | |
} catch (Exception ex) { |