Psiphon Library for Android enables you to easily embed Psiphon in your Android app. The Psiphon Library for Android is implemented in Go and follows the standard conventions for using a Go library in an Android app.
Follow Go Android documentation:
gomobile bind -target=android github.com/Psiphon-Labs/psiphon-tunnel-core/AndroidLibrary/psipsi.aarpsi.aar from source or use the binary releasepsi.aar to your Android Studio project as described in the gomobile documentationSee sample API usage in Psibot's PsiphonVpn.java. Uses gobind conventions for data passing.
Go.init(getApplicationContext()); in Application.onCreate()Psi.Listener.Stub to receive messages in Message(String line)Psi.Start(configFile, Psi.Listener) to start Psiphon. Catch Exception to receive errors.Psi.Stop() to stop Psiphon.NOTE: may add more explicit interface for state change events.