• Stars
    star
    135
  • Rank 269,297 (Top 6 %)
  • Language
    Go
  • Created almost 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Native Android UI via shared Golang library

Android GUI applications written entirely in Go

See main.go for example application.

State of the project

Right now project is not ready-to-use library, but it's intended to.

  • Can be done from Go:
    • subscribe to any sensor values (using normal refresh interval);
    • list View widgets from any layout;
    • call any method with simple arguments for View widgets (accepting strings, numbers and boolean);
    • calling simple View methods, like SetText; bindings to all methods for View widgets are autogenerated from the official documentation; all calls are syncronous, call will return described in documentation type;
    • subscribing to onClick, onTouch events;
    • WIP subscribing on other View widget events;

What a feature is that?

Everybody loves Go. Everybody wants to Go mobile. But Go can not into android GUI, right? Not exactly.

It is time to build android applications written in pure Go that are able to use android GUI (all that buttons, text fields and so forth).

But... how?

It's just slightly modified example from https://github.com/golang/mobile.

Beware muggles: magic inside. Android documentation parsing, RPC to cross-communicate between Go and java, autogenerated code via gobind, a couldron of java reflections concealed deep inside the project.

I've got the power?

As a developer, you can get all the views (resources) described in layout files inside android project. Having this knowledge, you can call view methods (for example, TextView.SetText) to change UI. Also, you can set up handlers for view events (button clicks etc).

As much as for view events, listeners can be set for sensors. For example, you can get actual data from accelerometer.

See "State of project" and issues list to get the picture on current state.

Install and run

Prepare your system for android development. Android NDK and Android SDK (v19) are required. You also need Apache Ant to build your project and ADB to upload the project to android device.

There's a chance that no simple way to install all the needed software exists, but you can start from here: https://github.com/golang/mobile.

Happy Arch Linux users can follow detailed instruction: https://github.com/seletskiy/kb/blob/master/40-howto/go-for-android-setup.md.

After preparation, clone project and start cute little all.bash:

go get -d github.com/seletskiy/go-android-rpc
cd $GOPATH/src/github.com/seletskiy/go-android-rpc
setup-android-env-go ./generate.bash
setup-android-env-go ./all.bash

Details about setup-android-env-go can be found here: https://github.com/seletskiy/kb/blob/master/howto/go-for-android-setup.md.

More Repositories

1

hastur

Zero-configuration containers under systemd using systemd-nspawn
Go
226
star
2

go-makepkg

Generate PKGBUILD for Golang programs and run makepkg
Go
62
star
3

firebase-emulator

Run Firebase Database emulator locally in Docker container
Shell
51
star
4

zsh-fuzzy-search-and-edit

Find and open editor on matched line lightning-fast
Shell
33
star
5

jira-agile-worklog-helper

Helper which track time spent on issue for you
JavaScript
32
star
6

monaco-font

My own pixel font for programming/shell; if you're using this, you're insane
Makefile
30
star
7

dotfiles

My system configuration. My introspection since 2012.
Shell
29
star
8

runki

Effortless AnkiSRS card managment to learn foreign words
Go
22
star
9

ash

Atlassian Stash (Bitbucket) reviews in editor
Go
21
star
10

carcosa

CLI password manager with profound Git integration
Go
15
star
11

vim-refugi

sshfs + fugitive = fffuuu-, sshfs + fugitive + refugi = hell yeah!
Shell
12
star
12

zsh-git-smart-commands

Wrappers for git commands to be efficient in the shell
Shell
12
star
13

kubernetes-bootstrap

Makefile for bootstrapping kubernetes cluster with Calico CNI & private Docker Image Registry
Makefile
9
star
14

urxvt-vim-insert

Make Shift-Insert work as expected in vim and shell
Perl
8
star
15

zsh-favorite-directories

zsh plugin for cd to list of favorite directories lightning fast
Shell
7
star
16

docopt-go

docopt bindings for go lang
Go
6
star
17

ebiten-android-minimal

Minimal Ebiten-powered Android App β€” https://ebiten.org/
Makefile
6
star
18

godiff

Unified diff file parser in Go (now with comments!)
Go
6
star
19

arch-apparmor

AppArmor Arch Linux packages that are works
Shell
6
star
20

jira-userscripts

Tracks time spent on issues
JavaScript
5
star
21

jibber

Turn WebHooks into jabber notifications
Go
5
star
22

chrome-editor

Backend for editing textarea contents in vim/emacs/sublime/whatever
Go
5
star
23

zsh-context-aliases

Dead simple implementation of context aliases
Shell
5
star
24

mainframe

Magnum Opus
Go
5
star
25

saturated

dead simple makepkg build server
Go
4
star
26

pidgin-start-conv

List buddies online or start conversation with specified buddy. Usable with dmenu!
Python
4
star
27

grapeyard

Stateless serverless DSLless cluster configuration tool
Go
4
star
28

ashium

Code review in vim with live update feature
Python
3
star
29

go-mock-file

golang lib for testing fs-related stuff
Go
3
star
30

zsh-smart-kill-word

Finally, better backward word deletion in zsh
Shell
3
star
31

zsh-zgen-compinit-tweak

Make compinit runs only once after all loading is done by zgen
Shell
3
star
32

kb

My personal knowledge base
2
star
33

zsh-prompt-lambda17

Highly extensible prompt for zsh
Shell
2
star
34

urxvt-patched

rxvt-unicode with my patches, not yet in upstream.
Shell
2
star
35

zsh-uber-ssh

Quick SSH aliases for zsh
Shell
2
star
36

tasker

My ubiquitous Tasker profiles
2
star
37

gen_tcpd

Generic TCP application, makes easy to build TCP-daemons.
Erlang
2
star
38

cake

Confluence Schedule Table Reader
Go
2
star
39

umb

UMB protocol realization for lufft.com products
Erlang
2
star
40

tplutil

Golang template utils
Go
2
star
41

mcabber-slack-completion

Autocomplete buddy names with starting @
C
2
star
42

zsh-hijack

Transform entered command line to new command line
Shell
2
star
43

zsh-hash-aliases

Global aliases starting with hash symbol
Shell
1
star
44

mcabber-autojoin

Automatically join to rooms on connect (for servers without bookmarks, like slack.com)
C
1
star
45

docopt-ver

docopt version setter for golang programs and git hook
Go
1
star
46

isnyseopen

Is NYSE open right now?
Go
1
star
47

gontrol

Ultrasimple tool for remote control from mobile phone
Go
1
star
48

slorry

Russian Post Tracker
Go
1
star
49

geth-go

Missing Ethereum geth JSON RPC client
Go
1
star
50

bloom-filter

Bloom Filter implementation in C
C
1
star
51

zsh-ssh-urxvt

Shell
1
star
52

zbackup

multithreading zfs backuper written on golang
Go
1
star
53

vim-nunu

Toggle relative number lines on cursor movement
Vim Script
1
star