Send WhatsApp to Specific Number Android Studio

Photo by Rachit Tank on Unsplash
@SuppressLint("NewApi")
public static void whatsapp(Activity activity, String phone) {
String formattedNumber = Util.formatPhone(phone);
try{
Intent sendIntent =new Intent("android.intent.action.MAIN");
sendIntent.setComponent(new ComponentName("com.whatsapp", "com.whatsapp.Conversation"));
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
sendIntent.putExtra(Intent.EXTRA_TEXT,"");
sendIntent.putExtra("jid", formattedNumber +"@s.whatsapp.net");
sendIntent.setPackage("com.whatsapp");
activity.startActivity(sendIntent);
}
catch(Exception e)
{
Toast.makeText(activity,"Error/n"+ e.toString(),Toast.LENGTH_SHORT).show();
}
}

Number with code Area.. :))

send whatsapp to spesific number from apps android in android studio