tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
6.91k stars 1.42k forks source link

Telegram on KaiOS #467

Open k0chir0 opened 5 years ago

k0chir0 commented 5 years ago

The web version is sort of slick but an app is in much of a need.

levlam commented 5 years ago

It seems that KaiOS supports only HTML5-based apps. It is powered by Gecko, so it should be possible to use TDLib through WebAssembly to create such application. But there should be a developer, which is interested in creation of such application.

levlam commented 5 years ago

TDLib 1.4.0 includes an example of TDLib usage in a browser and an NPM package tdweb, which can be used to create an HTML5-based KaiOS app. But still there should be a developer, which is interested in creation of such application.

yusrideb commented 4 years ago

when Telegram support KaiOS ?

Bricolas commented 4 years ago

I have just seen this : Telegram app for KaiOS. Is there any feedback from users ?

levlam commented 4 years ago

@Bricolas This is a "hello world" project, not a real Telegram app for KaiOS.

CrafterSvK commented 4 years ago

I would love to do this project, are here any guys which would like to participate on this?

Bricolas commented 4 years ago

I can only encourage you to start this development : I've many friends who will apreciate ! Myself, I'm not a programmer : I love debugging ;-) Yesterday, I've started a complete test of Nokia 800 Though : the only bad point is the absence of Telegram. WhatsApp is working fine !

thiagojedi commented 4 years ago

So... I'm trying to build one mostly as a study project, and I don't think it's going to be ready anytime soon.

It's using TdWeb as suggested by @levlam, but via the airgram project.

The biggest problem I'm having is that KaiOS, or at least my Nokia 8110 4G, it doesn't support WebAssembly. So the TdWeb have to use Asm.js. Asm.js seems to be a huge library that needs to be in memory for the app to work. So the initial loading takes forever, like 3~5 minutes every time I open the app, and the device feels a little laggy after I close.

I don't think the two platforms (tdlib and kaios) are a viable option right now. I don't know if is there any alternative to tdlib that doesn't require wasm or asm.js to work.

That been said, KaiOS and Mozilla are working together to improve the OS internals, so maybe the WebAssembly support could be on the way. Who knows?

levlam commented 4 years ago

@thiagoabreu You can try to wrap one of the pure JS implementations from the JavaScript contest https://contest.com/javascript-web-2.

thiagojedi commented 4 years ago

@levlam Just made a preliminary test on the first four ( II Place ). I tried to access via web browser on the phone, then I tried to packaged them as apps.

None of them loads on the web browser.

When packaged as app, only one of them loaded in a way that I could interact. Until I focused the phone input in the first page. I could not remove the focus for the cursor go to the button and proceed with the authorization.

But, I have to say, both in browser as well as an app, all the pages loaded instantly. Are those apps using a different version of tdlib?

levlam commented 4 years ago

Most of them don't use TDLib and instead reimplement everything from scratch.

Between, the main difference between Asm.JS and WebAssembly in our tests was in uncompressed source size, but desktop browsers worked pretty well with both of them after downloading.

thiagojedi commented 4 years ago

For desktop browsers, it is ok. But most KaiOS devices run on slow CPU and low available RAM. i.e. Nokia 8110 4G spec are Snapdragon 205 with 512 MB ram. I guess this kind of spec is not in your test cases.

rohansaw commented 3 years ago

Is anyone still onto this? I'd be interested to to build an Telegramclient for KaiOs :)