Android Question raise telegram channel or id by intent

ArminKH

Well-Known Member
hello
is this possible to show a id or channel which is registered in Telegram Messenger by intent?
some thing like this
B4X:
Dim i As Intent
        i.Initialize(i.ACTION_VIEW,"id:ArminKH1993")
        i.SetComponent("org.telegram.messenger/.messages.sendMessage")
        StartActivity(i)

and the api page is https://core.telegram.org/methods
thanx
 

ArminKH

Well-Known Member
this is java code for sharing a message but just i want to raise send message page
B4X:
/**
     * Intent to send a telegram message
     * @param msg
     */
    void intentMessageTelegram(String msg)
    {
        final String appName = "org.telegram.messenger";
        final boolean isAppInstalled = isAppAvailable(mUIActivity.getApplicationContext(), appName);
        if (isAppInstalled)
        {
            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"));
        }
        else
        {
            Toast.makeText(mUIActivity, "Telegram not Installed", Toast.LENGTH_SHORT).show();
        }
    }
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…