Is it possible to open Telegram or Viber programmatically through a specific contact with message body? I found "how to open whatsapp": whatsapp. A similar solution may exist for Viber and Telegram!
Regarding Telegram, you can do three things:
String user = "Telegram username";
Intent browserIntent = new Intent(Intent.ACTION_VIEW,Uri.parse("https://t.me/"+user));
startActivity(browserIntent);
Relating Viber you are also able to do so. And, as with Telegram, you can't search by number. The needed uri can be found here (according to Viber):
Find your URI on your account's edit screen.
String user = "Viber public account uri";
String message = "Prefilled message"; // Not mandatory
Intent browserIntent = new Intent(Intent.ACTION_VIEW,Uri.parse("viber://pa?chatURI="+user+"&text="+message));
startActivity(browserIntent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With