gpt4 book ai didi

android - 在android中打开 Telegram channel

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:34:18 32 4
gpt4 key购买 nike

在我的应用程序中,想要使用 Intent 打开特定的 Telegram channel 或 Telegram 组。我在 SF 中搜索但找不到任何东西。我尝试实现但我只能打开用户可以选择的所有 Messenger 应用程序,但不能打开 Telegram 或特定 Telegram 组或 channel 。如果找到 this在 sf 上,但这不是我问题的答案。

    Intent myIntent = new Intent(Intent.ACTION_SEND);
myIntent.setType("text/plain");
myIntent.setPackage(appName);
myIntent.putExtra(Intent.EXTRA_TEXT, msg);//
mUIActivity.startActivity(Intent.createChooser(myIntent, "Share with"));

最佳答案

打开 Telegram channel 或用户的 Intent :

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=partsilicon"));
startActivity(intent);

关于android - 在android中打开 Telegram channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34692116/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com