This is a simple golang wrapper for working uiautomator.
To install this library, simple:
go get -u github.com/trazyn/uiautomator-go
Import the package:
import ug "github.com/trazyn/uiautomator-go"
First, let yours mobile and PC join the same network.
ua := ug.New(&ug.Config{
Host: "10.10.20.78",
Port: 7912,
})
ua.Unlock()
// Show toast
toast := ua.NewToast()
toast.Show("hallo world", 10)