对于Instagram,Telegram和WhatsApp,您可以使用此方法
void getTelegram(){
try {
Intent telegramIntent = new Intent(Intent.ACTION_VIEW);
telegramIntent.setData(Uri.parse("https://telegram.me/diako099"));
startActivity(telegramIntent);
} catch (Exception e) {
// show error message
}
}
void getInstagram(){
try {
Intent instagramIntent = new Intent(Intent.ACTION_VIEW);
instagramIntent.setData(Uri.parse("https://www.instagram.com/diako_hasani99/"));
startActivity(instagramIntent);
} catch (Exception e) {
// show error message
}
}
void getWhatsApp(){
try{
String trimToNumner = "+989180074693"; //10 digit number
Intent intent = new Intent ( Intent.ACTION_VIEW );
intent.setData ( Uri.parse ( "https://wa.me/" + trimToNumner + "/?text=" + "" ) );
startActivity ( intent );
}catch (Exception e){
}
}