The GMORYX(GOMOBILE ORYX) is a API adapter to use go-oryx-lib in Android or iOS.
- AndroidHTTPServer, The HTTP server example for Android.
To setup the gomobile, please read blog post.
The Go mobile subrepository adds support for mobile platforms (Android and iOS) and provides tools to build mobile applications.
There are two strategies you can follow to include Go into your mobile stack:
- Writing all-Go native mobile applications.
- Writing SDK applications by generating bindings from a Go package and invoke them from Java (on Android) and Objective-C (on iOS).
For more information, please read wiki and repository.
First of all, please build the library gmoryx.aar
by:
cd $GOPATH/src/github.com/ossrs/go-oryx-lib/gmoryx &&
mkdir -p AndroidHTTPServer/app/libs &&
gomobile bind -target=android -o AndroidHTTPServer/app/libs/gmoryx.aar
Remark: Read GOMOBILE to setup environment.
Open this project in AndroidStudio, run in Android phone, which will start a web server:
Access the web server:
Winlin, 2017