Created
October 16, 2014 16:34
-
-
Save a7madev/606ea5805deec9c21acb to your computer and use it in GitHub Desktop.
Open Whatsapp Contact Chat
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
void openWhatsappContact(String number) { | |
Uri uri = Uri.parse("smsto:" + number); | |
Intent i = new Intent(Intent.ACTION_SENDTO, uri); | |
i.setPackage("com.whatsapp"); | |
startActivity(Intent.createChooser(i, "")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment