Please build and include the apks (probably also windows binaries and linux appimages) for the examples so people who stumble upon this repo don't have to download all the required components and build just to see the examples in action and how well it performs.
I'd also suggest you include a showcase page so people can see what others (who wish to submit their apps) have built and how great the library is.
This list exists and you can find it here: https://github.com/therecipe/qt/wiki/Getting-Started#3rd-party-examplesdemosapplications
I have two apps in there (search for my username) - one of them (WingIt) has OSX/Windows/Linux compiled, and the other (Got-Qt) which is a demo on building apps, I think has the OSX one ready to go - realise thats not the Android one but perhaps its a start?
Thanks for the link. 馃槶 Apparently none has sample APKs... Life is hard, we as humans shouldn't make it harder for simple things like having a first look.
hmmm, I can compile one for you and link to it. Which one(s) do you want an APK for. I can do the examples in this repo or mine. Let me know.
This repo would be great! Thanks in advance.
Well this repo isn't an example it's the whole framework, there are loads of examples in here so if you pick a couple I'll make them, I'll make APK for amlwwalker/got-qt too.
I think from the examples folder
bluetooth/picturetransfer or bluetooth/pingpong
qml/gallery (I'm hoping this is the one that shows the widgets)
Is there any other example that doesn't use QML for Widgets?
Also any example using the android service api will be great!
Here you go - three of them, hopefully this is useful. I haven't tried them as didn't have time to test but they compiled fine. I added the android service one that shows a notification on android. Let me know if useful (or if they don't work).
Sweet! 馃 Testing right away
They all work pretty great! Running on Android 7.
Is it normal that for such "Hello World"-level applications, the APK sizes are beyond 11MB?
And are there ways to make it smaller? I mean you haven't even use any external Go libraries yet aside Qt.
Hi,
There is quite a lot of information about the size of Go binaries, I link to some reading material below, however a few points. There is information left inside a binary, for instance debugging information that can be removed. The first article talks about this and when I apply that to a project I am working on now, the binary shrinks by 25%.
IIRC Go binaries compile statically. This means that all the libraries etc it needs are embedded inside of the application so that it doesn't have to rely on the system it is running on to have those libraries. Sometimes, for instance if you are writing apps that will run on machines you control, or for a specific OS, you can dynamically compile and they will be smaller, however I suspect if you are writing android apps, best to stay static, however if you think that the whole of Java is installed on android devices, when you write an app in Java, the app itself can be smaller as the libraries are available already on the device.
You could for instance, write plugins in Go, and call them from a Java "front end". Leaving Go to do the heavy work and Java to do the UI. This is something I do plan on playing with at some point, but at the moment I'm enjoying QML/Qt UIs that I am the android sdk, so I am probably going to stick with that. If you however want to see how to make shared object files, see the Go plugin library. It creates .so files from Go code and then look at Go plugin library, or have a read here
https://medium.com/learning-the-go-programming-language/calling-go-functions-from-other-languages-4c7d8bcc69bf
Hope this helps
Most helpful comment
Hi,
There is quite a lot of information about the size of Go binaries, I link to some reading material below, however a few points. There is information left inside a binary, for instance debugging information that can be removed. The first article talks about this and when I apply that to a project I am working on now, the binary shrinks by 25%.
IIRC Go binaries compile statically. This means that all the libraries etc it needs are embedded inside of the application so that it doesn't have to rely on the system it is running on to have those libraries. Sometimes, for instance if you are writing apps that will run on machines you control, or for a specific OS, you can dynamically compile and they will be smaller, however I suspect if you are writing android apps, best to stay static, however if you think that the whole of Java is installed on android devices, when you write an app in Java, the app itself can be smaller as the libraries are available already on the device.
You could for instance, write plugins in Go, and call them from a Java "front end". Leaving Go to do the heavy work and Java to do the UI. This is something I do plan on playing with at some point, but at the moment I'm enjoying QML/Qt UIs that I am the android sdk, so I am probably going to stick with that. If you however want to see how to make shared object files, see the Go plugin library. It creates .so files from Go code and then look at Go plugin library, or have a read here
https://medium.com/learning-the-go-programming-language/calling-go-functions-from-other-languages-4c7d8bcc69bf
Hope this helps