0

I have Android app. I need open Viber public chat from my app. The numbers for this chat are not in the user's phonebook.Is it possible?

I have not found information about this. Just a few old questions.

FetFrumos
  • 5,388
  • 8
  • 60
  • 98

1 Answers1

1

You could try using the following code (from Here):

var viberPackageName = "com.viber.voip";
var phone = "5757575757";

try
{
    StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("viber://add?number=$phone")));
}
catch
{
    try
    {
        StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("market://details?id=$viberPackageName")));
    }
    catch
    {
        StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("https://play.google.com/store/apps/details?id=$viberPackageName")));
    }
 }
York Shen
  • 9,014
  • 1
  • 16
  • 40