Page 1 of 1

Button to send a *.PDF file using Telegram

Posted: 2024-04-04, 11:08 UTC
by hb_union
Hi!Help, please!

I can't send *.PDF file via button into Telegram :(

Command:
Telegram:org.telegram.messenger:org.telegram.ui.LaunchActivity
Parameters:
stream:%P%N - does not work
list: instead stream:%P%N - does not work
At best, this puts only the file name in the chat, but not the file.

Xiaomi HeperOS 1.0.2.0, Android v.14

Re: Button to send a *.PDF file using Telegram

Posted: 2024-04-07, 13:39 UTC
by ghisler(Author)
I don't use Telegram myself, so I can't give you a direct answer. But it should work when you change the function type to "Send to app" and then click on >> to choose the correct activity (which may be different from the launch activity).
list: is normally used with multiple selected files, then the action used is ACTION_SEND_MULTIPLE. You may need to set the file type manually on a separate input line via "type:" field, and the message text via "extra:TEXT:", e.g.
type:application/pdf
stream:%P%N
extra:TEXT:Here is the document %N