In this post, I want to talk about compiling and using TOR in your Android projects. The main source relies in guardian repository.
Getting TOR Binary
As indicated in tor-android repository, by adding the maven URL to the gradle config of your project, you are able to use TOR’s latest build for Android. However, I couldn’t add it through the link.

This is what I get when I click on the link:

Therefore I decided to download the complete source code and compile from scratch.
Getting TOR
The very easy method of getting the source code is:
git clone https://github.com/guardianproject/tor-android.git
But after getting the code, you need to download the submodules which are located in external subfolder.

git submodule update --init
# if there are nested submodules:
git submodule update --init --recursive
# from https://www.vogella.com/tutorials/GitSubmodules/article.html#:~:text=2.3.-,Pulling%20with%20submodules,in%20the%20git%20pull%20command%20.
So everything is OK. Now you can use ./gradlew build to build the source code. However, you should compile the binaries first. You can watch my YouTube video about the details.
My Contribution
I have added some code to make installing and starting TOR easier. Its functionality is similar to Tor Onion Project.
You can see my repository in the following link: https://github.com/mirsamantajbakhsh/tor-android/tree/HS_Connect
Here is a screenshot of my commits in tor-android project in a branch named HS_Connect.

The Video
The whole process is recorded and uploaded to my YouTube channel.