用电报发送消息 [英] Using Telegram to send a message

查看:264
本文介绍了用电报发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我试图发送消息到电报的应用程序的用户,但目的只打开电报的应用程序 - 它不选择conctact并发送邮件:

Hi i try to send a message to a telegram-app user, but the intent opens only the telegram app - it don't choose a conctact and send the message:

public void shareTelegram(String message)
{
    Intent waIntent = new Intent(Intent.ACTION_SEND);

    waIntent.setType("text/plain");
    waIntent.setPackage("org.telegram.messenger");

    if (waIntent != null)
    {
        waIntent.putExtra(Intent.EXTRA_TEXT, message);//
        startActivity(Intent.createChooser(waIntent, "Daniel"));
    } 
    else 
    {
        Toast.makeText(getApplicationContext(), "Telegram is not installed", Toast.LENGTH_SHORT).show();
    }
}

有没有办法完全地发送消息?
我可以完全地发送消息,不显示来电?在先进的感谢

Is there a way to send the message completly? Can i send the message completly without displaying telegram ? thanks in advanced

推荐答案

TLSharp是C#基本实现电报的API。看到它在这里 https://github.com/sochix/TLSharp

TLSharp is basic implementation of Telegram API on C#. See it here https://github.com/sochix/TLSharp

这篇关于用电报发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆