I followed this link and this is my code
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(\"content://com.android.contacts/data/\" + \"MYNUMBER@s.whatsapp
private void openWhatsApp(String id) { Cursor c = getSherlockActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI, new String[] { ContactsContract.Contacts.Data._ID }, ContactsContract.Data.DATA1 + "=?", new String[] { id }, null); c.moveToFirst(); Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("content://com.android.contacts/data/" + c.getString(0))); startActivity(i); c.close(); }
Where id is what's app uri like
0987654321@s.whatsapp.net