Skip to content

Instantly share code, notes, and snippets.

@SpikedPaladin
Last active September 27, 2025 11:40
Show Gist options
  • Select an option

  • Save SpikedPaladin/c51d95773fa851c6e54e8ae1cf4e5b10 to your computer and use it in GitHub Desktop.

Select an option

Save SpikedPaladin/c51d95773fa851c6e54e8ae1cf4e5b10 to your computer and use it in GitHub Desktop.
Setup TelegramGLib on Android with Termux

1 Download termux

To use TelegramGLib on Android you need latest version of Termux app.
Don't use Termux from GooglePlay, it's outdated and will not work!
You can download it from Github or F-Droid

2 Build TelegramGLib

2.1 Update Termux packages

$ pkg update

and press Enter when prompted

2.2 Install required dependencies

$ pkg install git python3 valac libsoup3 json-glib cmake ninja gobject-introspection

and press Enter when prompted

2.3 Install meson

$ pip3 install meson

2.4 Clone and build TelegramGLib

$ git clone https://github.com/SpikedPaladin/TelegramGLib
$ cd TelegramGLib
$ meson setup --prefix=/data/data/com.termux/files/usr build
$ cd build
$ ninja install

Wait until compilation finished

Now you can use TelegramGLib to run bot on your Android phone

Example:

$ vala --pkg telegram-glib-0.3 /path/to/your/vala/file
@Panpan-Has
Copy link

How can i use it now termux Say (../src/types/chat/chat-id.vala:4.5-4.32: error: Compact class Telegram.ChatId' cannot inherit from non-compact class GLib.Object'
4 | public class ChatId : Object {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compilation failed: 1 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment