I have a go library that i want to run on android and use its methods in my android app. I could write the whole android app in go to make it easier to use this dependency. Is this possible? If so, how?
Download Termux (Linux Emulator) from google play store and open it. Next, wait for it to perform an automatic download of its resources. After that operation, the run the following command: pkg install golang pkg install git
The got package is required when downloading golang packages. Eventually, you can test it by running (go) command.
Golang support for mobile development has been steadily improving. Today it is even possible to build some simple all Go apps (depending on which features you need) as well as Go libraries. Please see https://github.com/golang/go/wiki/Mobile for more info.
UPDATE: In further improvement, libraries are being created to support even UI on mobile platforms. https://fyne.io provides rather robust set of features for mobile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With