 The back end maybe be on go and now also your client so your team could be all only Go developers. You don't need to Java or iOS developers How is this possible well, this is a very interesting topic I will not spend much time here, but uh Java application which are Android could run C code via Java native interface and go could communicate with C code also with a C go This is similar to whatever is there in for iOS devices To develop Mobile app we have two ways to do it with go mobile. We have the go mobile bill common common which Will write a all go native which is it's only go code application it's also called a native application usually and it's That work and buzz it on open GL bindings There is another way which is a go mobile buying Which is also called SDK application which what you do is you write go code Go mobile generate so on go bindings and you look it as a library in your in your Android application in the first case go bill will generate the apk apk file and then Second you have an a a our file, which is you need to be imported In your In your Android project So native application In short, they are entirely writing in go you don't need anything extra The they work on Android iOS on also on desktop You are using open GL Binding which means that if you are already doing a mobile application with open GL and C code This should be like very similar There is experimental super for audio as pride font Because everything you have to be done in in goes from from drawing the steering to Taking the input of the keyboards or whatever But there is a big problem Not so big, but they are not ready to be published on the play store As I said before the go mobile bill Command it will generate the apk But you need to open that file and change the icon Thip all in the content and also sync with your certificate to be able to to be published on the play store the apk works as a If you install it directly on your mode on your device, but to be published You need to do a few steps steps Also check out Android go which is a similar project to go mobile, but a bit different and And I hope that go mobile in the future Let you make an apk file ready to be published to be To make a project with go bill Just go mobile bill just specify the target which is Android or iOS see the path to your project And your your file will be there SDK application or What this talk is really about is what I have experience with I think it's easier to develop SDK application a better than a native application because with SDK you What are doing is you take your Java application and use just your go code as a library So some part of your application is in go and some part is in Java or object it see It's easier to start with if you are going to start In a in the mobile projects, but this is what I recommend Advantage doing this is that you could reuse your go code as I said before and it's a cross platform code your go go mobile will translate and generate bindings for both an Android and iOS devices is the same The disadvantage is that only a small subset of go type are supported. For example, no non sign integer language being they have a small Overhead and there are some APA Limitation for example a function could return none one or two results in case it return two the second one has to be an error and Some code like the user interface Need to be platform specific Because what you are doing is Java application or an iOS app and using so now go as a library before we start we need Go 1.5 and To install is go get go land.org X mobile command go go mobile and Go mobile in it It will download a few things and it will be ready You also need the Android SDK and an emulator the default emulator is okay But I recommend Jenny motion, which is a commercial paid one, but it's way faster and more It's better than the default one also Android studio is not needed, but strongly recommend it It will simplify a lot the things Binding as I said the SDK application will generate some bindings This is what you have in in go and this is what it will be transferred in Java You could see that the example here later is if you really want to take a look at What is actually generated and things I will Point is like Sported variables or a stroke fields they get a getter and setter and the error in go they They will be an exception in Java So let's see some some example code your go code is quite simple here You just a package name my go library with a function named hello that will receive some parameters the the generate Java bindings is a well a class My go library which we said before the package will be transferring to class and the Hello The hello function is now a static method of the my go library class one thing to point here is like in In go we have the uppercase H, but in Java is lower case more more examples you here have a Struck with a few function and this is what it will be generated at the vending one one thing to point out is Gommobile is not a transpiling your go code is making a Charged object library and Generate some bindings and package everything on a AR file example using this is well or go code as before and in Java it could be the main activity or whatever in your code you need to import the library Another use it. It's very simple and it's real good This is an example of the same, but this time as we said we are Returning to results the second one has to be an error and In Java it's an exception. We need to catch if we don't catch it or well it will complain I mean it doesn't compile so That is That's how we call a front Java to or go code make a call But let's see the other way like from or go code May make a call to Java well This is maybe a bit complicated at first. It's not as easy as the other thing, but I find it very useful for Example if you need to update the user interface because the Processing go is taking too much or you don't are downloading a file or something you need to do this So first we are going to create an interface with some method in go and also a function and register callback to save To shape the reference to our Java code Later we need to implement our interface In Java which is the same as before like implements Java call Which is this one and with the two method we need to do that and Finally in our go in your Java We just well we import our package and everything and then we create a go callback And then register the callback So it's the reference is safe in go and we could call later in go. We could call To son of our Java method How to build this well is a go mobile bin you specify the target which is iOS or Android The output library, which is a AR file and everything the V is for verbose to show if something is wrong or not And then later in our go project we need to Modify or create a few files. It's it's a bit complicated. Maybe it was like complicated But if you are using Android Studio is just a sample of file new new model import and then select your AR package That's why I recommend Android Studio, but if you don't want to use it You could just modify the gradle files with including your library there you just tell the dependency you need to compile that and Where where to locate the file There is one problem, I waited so I mean I spend Some time figuring out because I know the I don't have much experience with a Mobile project and Android so the problem was like I was developing my go code at the same time as the Android application When you modify your go code and recompile and you create a new AR file The Android project didn't take those changes So You need to modify here You need to add a new file better modified another one you just Select add a repository so he and and there you make the project compile everything and take Every time the new changes So that's That's the theory That's that's work. Well, yes, it's work. This is our success story We create password manager for treasure treasure is This small device. It's a crypto currency hardware wallet That you connect to your phone the interface for the application is a react native We already we were using All existing go package Tesoro and we use some how like very very to have a to put everything together It's available at the Apple store there at the play store This is how it lacks looks the application and then this is This is how it's below or structure the application all our user interface is react native the program logic is Share because the the main logic code is saying go but we need Java for a few things Like for example, we use it as mostly as a project proceed between react and go but there are a few things like since it's a Small device that you connect to your phone. We need to access the USB and for that you need a unique first to ask permission in Java and open the connection to the USB and then Pass the file descriptor to go and then in God you are ready to use to use so our Communication with the device is in gold But at first when the application boot up we need to list the devices connected to their phone and ask permission for dropbox synchronization also The authorization is in in Java because you need to open a web view and take a token But once we have the token we pass it to go and the upload in or don't don't load in files are don't in go everything There are other success story. Maybe the most famous is Ivy from Rob Pike, which is a interpreter for APL language Goku, which is a Sudoku soldier from Miguel Espinosa which He's also using react native as the user interface Some tips by turn or in our experience Go code may take some time If you are doing some big calculation or something in our case in is was a communication with the device it could take some time to get a response and Java will complain so to avoid that you could use a go routine So once you You call your job as you go code You just call a routine so this function return directly to Java and you don't get another complaint or use an async class in Java for for that If you are communicating or maybe don't load in files or upload in files as I said before for accessing hardware or other feature you need to ask permission in Java and then pass the File descriptor the pointer or the reference to go I've been told there is a little trick like you could target Older SDK version in in Java that doesn't include that feature So you maybe are able to directly use the USB From go but it was a very very little Java code needed so we don't have any problem at Internal writing or reading files at the internal storage But for external storage you also need to To ask permission and also since the the upcycle of the Java is a bit Straight make sure you remove or create that list there if you are using one some not as said before like Java is experimental in maybe the last five six months This is what it was before and this is later this one small change it But they break your code so that's that's what you should expect It's but the the go mobile itself is very very stable It's experimental with machine There's a little support for a hardware and sensor for the moment like the access the camera or usb or maybe the gyroscope Don't forget is a linux device with some restriction for example to communicate with the usb. We use a linux driver a Brightening go and Also Android manifest you need to put there some information Here is some links I find useful like a small demo application I made an example of the bindings and some more information and That's all