##Psiphon Android Library README
###Overview
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.
###Building with Docker
Note that you may need to use sudo docker below, depending on your OS.
#####Create the build image:
docker build --no-cache=true -t psiandroid . (this may take some time to complete)psiandroid when running: docker images#####Run the build:
Ensure that the command below is run from within the AndroidLibrary directory
cd .. && \
docker run \
--rm \
-v $(pwd):/go/src/github.com/Psiphon-Labs/psiphon-tunnel-core \
psiandroid \
/bin/bash -c 'source /tmp/setenv-android.sh && cd /go/src/github.com/Psiphon-Labs/psiphon-tunnel-core/AndroidLibrary && ./make.bash' \
; cd -
When that command completes, the compiled .aar file (suitable for use in an Android Studio project) will be located in the current directory (it will likely be owned by root, so be sure to chown to an appropriate user).
###Building without Docker (from source)
#####Prerequisites:
build-essential package (on Debian based systems - or its equivalent for your platform)#####Steps:
gomobile bind -target=android github.com/Psiphon-Labs/psiphon-tunnel-core/AndroidLibrary/psi
-ldflags argument to gomobile bind.psi.aar###Using the Library
psi.aar from via the docker container, from source, or use the binary releasepsi.aar to your Android Studio project as described in the gomobile documentation#####Limitations