【问题标题】:How open Viber public chat from Android app?如何从 Android 应用程序打开 Viber 公共聊天?
【发布时间】:2018-11-14 19:25:34
【问题描述】:

我有安卓应用。我需要从我的应用程序中打开 Viber 公共聊天。此聊天的号码不在用户的电话簿中。有可能吗?

我还没有找到这方面的信息。只是几个老问题。

【问题讨论】:

    标签: android xamarin viber


    【解决方案1】:

    您可以尝试使用以下代码(来自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")));
        }
     }
    

    【讨论】:

      猜你喜欢
      • 2015-01-27
      • 1970-01-01
      • 2020-01-21
      • 1970-01-01
      • 2012-02-16
      • 2012-03-31
      • 1970-01-01
      • 1970-01-01
      • 2019-08-21
      相关资源
      最近更新 更多