Skip to content
/ Kangle Public

Bangle.js First Application (Timer) KotlinJS Edition

License

Notifications You must be signed in to change notification settings

Xaseron/Kangle

Repository files navigation

Kangle: Bangle.js First Application (Timer) KotlinJS Edition

This is the Bangle.js First Application guide completely written in Kotlin JavaScript for the The World's first Open Source Hackable Smart Watch.

Building

./gradlew assemble

You can find the compiled code in build/js/packages/Kangle/kotlin/Kangle.js.

Or use this gist: https://gist.github.com/Xaseron/5527e10f225823b99bf2a55db435fdb2

Running

The simplest way to run this code is to copy the file or gist and paste it into the Emulator.

Sourcecode

This project consist of two files:

  • Main.kt: resembles the official First Application guide
  • Externals.kt: type definition of every Espruino API used by the application

Todo

There is a lot of room for improvement. My JavaScript knowledge is very limited. Help is very much appreciated. PRs welcome.

Dependencies

Currently, they are all defined manual. It would be nice to somehow import than. The Emulator has some type hints, so this might be possible. The other possible solution would be to auto generate them.

Kotlin stdlib support

At the moment plain Kotlin + Espruino API is usable. The Kotlin stdlib is partial working thanks to Dead Code Elimination (DCE).

About

Bangle.js First Application (Timer) KotlinJS Edition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages