April 18, 2019

Gomobile - Under the hood

Photo by Nathan Van Egmond on Unsplash To understand and fully appreciate what Gomobile does, we’ll need to go through a few concepts (features) related to Java/Objective-C and Go itself and see how Gomobile brings them together. Primarily Java and Objective-C ‘s ability to communicate with c / c ++ and go’s ability to generate c shared libraries. C and C++ support in Java and Objective-C Java and Objective-C applications have had the ability to interact with libraries written in c and c ++ for a while. Read more

April 13, 2019

Gomobile - Caveat Emptor

My previous post talks about implementing a simple business logic in Go and integrating it with a mobile application. As an application grows in complexity, there comes a need for a more complex data transfer mechanisms to exist between the app and the library. This post lists a few caveats that one needs to keep in mind while working on Gomobile. Communication between App and Library Essentially, the communication with Go has to be two way. Read more

April 12, 2019

A Three Step Recipe for using Gomobile

In my earlier post, we saw different ways in which we can use Gomobile. In this post I’ll try illustrating how to incorporate Gomobile into a mobile application using the bind command. Prerequisites Ensure that you’ve setup Go and Gomobile in your machine Install NDK (If you are generating a Android library) Three Step Recipe Step 1 - Write a Go Package Create a go package in $GOPATH/src/github. Read more

April 10, 2019

An Introduction to Gomobile

When someone reads about the Go programming language, they would probably come across Rob Pike’s famous ‘Concurrency Is Not Parallelism’ talk or they might discover that Docker and Kubernetes and many other cloud infra tools have been written in Go (Go has been dubbed ‘The Language of the Cloud’). I want to write about one of Go’s lesser known tool in the box - Gomobile. Gomobile is a mobile application development tool written in Go, built with the aim of developing cross-platform applications. Read more