Practice follow https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 and use Java instead of JS for Android.