Closed Onionus007 closed 3 years ago
Also place provided Java wrapper files in the corresponding folder.
By java wrapper you mean which files? Sorry, I am really really new to this
And also, when I try to import the tdlib I for some reason get an error
https://github.com/tdlib/td/blob/master/example/java/org/drinkless/tdlib/example/Example.java
I use this as a reference point for imports
If you want to create an Android app, you need TDLib build for Android. You can find a prebuild library at https://core.telegram.org/tdlib/tdlib.zip.
Yeah yeah, thats what I have, do I just use this as a project file?
There is no project in the archive. You need to add java and so files from the archive to your project as specified in the StackOverflow answer.
Yeah, that's what I did, but it still says that I can't import the tdlib module
How do you import it?
I take the archive, unpack it, take the files from libtd/src/main/libs and create a jniLibs folder in the folder src/main for them and put them there. According to the stack overflow answer that's about it
Have you copied the corresponding Java classes to your project?
To be perfectly clear, by that you mean Client.java, Nativeclient.java and TdApi.java, right?
Yes.
This is what I got atm
And then I reference them by using import com.example.fima.Client; in my case
You must not change the package name.
I just copied this: "package com.example.fima;" from my initial MainActivity.java
You must not change package of java classes. You must not change provided source files and place them in the expected directory.
And then that would be it, I can simply import the classes?
Hello everyone,
I am very new to java programming and I am having somewhat of an issue adding the provided pre-packaged TDLib instance to an Android Studio project. I have the .zip file and what appears to be a part of an Android Studio project but for the life of me I can't figure out what to do.
Would any of you be so kind as to provide me with a step-by-step instruction of what exactly I need to do to get it working?