Open telegram channel in android

匿名 (未验证) 提交于 2019-12-03 02:48:02

问题:

In my app want to use Intent to open specific telegram channel or telegram group. i search in SF but i can't find anything.i try to implement but i only can open all messenger apps that user can choose but not telegram or specific telegram group or channel. if find this on sf but it's not answer to my question.

    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")); 

回答1:

Intent for opening a Telegram channel or user :

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


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!