如何从 Android 应用程序打开 Viber 公共聊天

Eri*_*lho 7 android viber

我知道如何在 Viber 中打开与号码的对话: 如何从 Android 应用 [新版本] 开始 Viber 通话?

但是如何打开公共聊天?有任何想法吗?

提前致谢

小智 2

这段 Kotlin 代码对我来说效果很好

        val viberPackageName = "com.viber.voip"
        val phone= "5757575757"

        try {
            activity?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("viber://add?number=$phone")))
        } catch (ex: ActivityNotFoundException) {
            try {
                activity?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=$viberPackageName")))
            } catch (ex: ActivityNotFoundException) {
                activity?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=$viberPackageName")))
            }
        }
Run Code Online (Sandbox Code Playgroud)