go mobile : keyboard input, camera

540 views
Skip to first unread message

zzz...@gmail.com

unread,
Aug 12, 2016, 1:00:23 AM8/12/16
to golang-nuts
Hi,

  I have looked the go mobile docs / examples (the most advanced being 'flappy gopher'), but I can not find code/API for either of the following:

  1) accessing the camera (i.e. taking a picture)
  2) keyboard input (is the current best to draw a bunch of squares with letters in them in OpenGL and manually track the touch events?)

Thanks!

dani...@gmail.com

unread,
Aug 13, 2016, 4:59:01 PM8/13/16
to golang-nuts
About the camera I think you best hope is use NDK (c++ bindings to android functions).
But you are out of luck as most of the links I search do not provide a solution.
The best answer I find is this :


Not tested, but I did a quick search because I will need this on the future.

Maybe to make it work without hacks you can make you app a android/iOS native application and call the go code as a SDK app. This way you can have all the calls on java/swift/objective-c.
Reply all
Reply to author
Forward
0 new messages