Tor Mobile Dev Guide
  • 🧅Welcome to Onion Mobile Devs!
  • The History of Tor
  • The Tor Protocol
  • Tor ("C Tor") vs Arti: What?!
  • Mobile Concepts
    • Mobile Apps with Tor
    • Possible Ways to Tor Your App
    • Limitations of Mobile Devices
    • Mobile Users in the OnionVerse
  • Tor on Android
    • All The Onions on Android
    • Tor-Android library
    • Pluggable Transports for Android
    • NetCipher with Orbot (Legacy)
    • TorServices
    • Arti Mobile on Android
  • Tor on iOS
    • All The Onions on Apples
    • Tor.Framework for iOS
    • Pluggable Transports for iOS
    • IPtProxyUI
    • OrbotKit
    • TorManager
    • Arti and Onionmasq on iOS
  • Help and Community
    • Community Case Studies
    • Developer Story: Arti Integration Journey
    • Where to get help
Powered by GitBook
On this page
Edit on GitHub
  1. Tor on Android

Tor-Android library

Integrating Tor directly into your mobile app

PreviousAll The Onions on AndroidNextPluggable Transports for Android

Last updated 1 year ago

Source repository:

Easy to integrate as a Maven dependency

dependencies {
    implementation 'info.guardianproject:tor-android:0.4.8.7'
    implementation 'info.guardianproject:jtorctl:0.4.5.7'
}

Bind to Tor as a Service

bindService(new Intent(this, TorService.class), new ServiceConnection() {
            @Override
            public void onServiceConnected(ComponentName name, IBinder service) {

                TorService torService = ((TorService.LocalBinder) service).getService();

                Toast.makeText(MainActivity.this, "Got Tor control connection", Toast.LENGTH_LONG).show();
            }

            @Override
            public void onServiceDisconnected(ComponentName name) {

            }
        },BIND_AUTO_CREATE);
https://github.com/guardianproject/tor-android/