tdlib / td

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

How save client? #2518

Closed ghost closed 1 year ago

ghost commented 1 year ago

I'm making an Android app! Everything works, but only when the application closes and reopens Client becomes null. But this is understandable, as I understand it, in order to save the session, you need to save the client in a third-party database (file). But how to do it if the Client object is not serialized

levlam commented 1 year ago

The app isn't supposed to save anything between restarts. All needed data is saved by TDLib and the app just needs to provide the same database and files directory in setTdlibParameters to the newly created Client after restart. See https://core.telegram.org/tdlib/getting-started for more details.

ghost commented 1 year ago

Thahk you