Working on a Go project and using gomobile to generate .apk file. I am trying to open a browser in the go code with a passing URL. I know go supports running CMD commands in different operating systems such as windows and Linux. Wonder to know if there is any code to support Android OS as well. In other words in following code what should I have under
case "android":
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()
default:
err = fmt.Errorf("unsupported platform")
}
if err != nil {
log.Fatal(err)
}
}