this is a skeleton for an Android app running Elm in a webview: https://github.com/leforestier/elm-android-app
There’s a Python script that can build the app, install it on an Android device etc…
I guess what I need to do now is improve the documentation and find some modules that help with specific Android gestures handling (I guess there must exist such modules?). Either I will embed these modules in the repo, or, more probably, I will just link to them and advise to install these modules.
I should also make a better looking demo app.
I think it would greatly improve Elm’s popularity if it was straightforward to make phone apps with it. If you know of other projects that help with making phone apps with Elm, please tell me, I’ll add a link to them in my repo.
I will post more in this thread as I improve the repo.
Just had a look, I absolutely love how clean this is!!!
I feared maven and compat libraries and jetpacks but instead it’s ultra clean and ultra simple!
I modified the repo a little bit. There was an “elm.json” file already there from the start, but I removed it. It’s better if users run
elm init. This way they have an elm.json that matches the version of Elm on their system. I modified the doc to instruct users to run
The next step is gesture support. I found Swiper - elm-swiper 1.0.2 to handle swipe, but I haven’t found an Elm library that would handle other gestures such as “pinch”, “rotate”, “pan”…
But I think it’s going to be possible to use Hammer.js for that. I plan to write a small Elm library that should make it easy to use Hammer.js in Elm. I will post in the forum when I’m done with that.
Update: as planned, I’ve created a helper library that makes the gesture events from Hammer.js easy to use with Elm.
Hammer.js is actually doing all the work of gesture detection, and it’s pretty good at it. Now you can use events attributes such as
onRotate etc… in your Elm application and it’s as easy as using onClick.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.