Joakim Posted in reply to Joakim



Permalink Reply

On Friday, 2 June 2017 at 08:58:01 UTC, Joakim wrote: > On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote: >> On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote: >>> The beta release of ldc 1.3, the llvm-based D compiler, is now out: >>> >>> https:// github.com/ joakim-noah/ android/ releases >>> >>> It is accompanied by a non-trivial sample app from the Android NDK, ported from C++ to about 1.2 klocs of D: the classic Utah Teapot ( >>> >>> There are two builds of ldc, a cross-compiler that you can use from a linux/x64 shell to compile to Android/ARM, and a native compiler that you can run on your Android device itself. As I pointed out last year, not only is ldc a large mixed D/C++ codebase that just worked on ARM, but it is possible to build arbitrarily large Android apps on your Android device itself, a first for any mobile platform: >>> >>> http:// forum. dlang.org/ thread/ ovkhtsdzlf zqrqneolyv@ forum. dlang.org >>> >>> This is the way the next generation of coders will get into coding, by tinkering with their Android devices like we did with Macs and PCs decades ago, and D is one the few languages that is already there. >>> >>> I will write up instructions on how to write an Android app in D _on_ your Android device by using ldc and the Termux app, and get ldc into the Termux packages, a package repository for Android: >>> >>> https:// play.go ogle.com/ store/ apps/de tails?id= com.termux& hl=en The beta release of ldc 1.3, the llvm-based D compiler, is now out:It is accompanied by a non-trivial sample app from the Android NDK, ported from C++ to about 1.2 klocs of D: the classic Utah Teapot ( https:// en.wikip edia.org/ wiki/Utah_ teapot ), updated with mobile touch controls. This app also demonstrates calling Java functions from your D code through JNI, though most of it is written in D.There are two builds of ldc, a cross-compiler that you can use from a linux/x64 shell to compile to Android/ARM, and a native compiler that you can run on your Android device itself. As I pointed out last year, not only is ldc a large mixed D/C++ codebase that just worked on ARM, but it is possible to build arbitrarily large Android apps on your Android device itself, a first for any mobile platform:This is the way the next generation of coders will get into coding, by tinkering with their Android devices like we did with Macs and PCs decades ago, and D is one the few languages that is already there.I will write up instructions on how to write an Android app in D _on_ your Android device by using ldc and the Termux app, and get ldc into the Termux packages, a package repository for Android: >> >> Hello, >> >> Thanks for the post. I have tried to run apk on 2 devices: >> 1. LG-E440 phone with Android 4.1.2 >> 2. Orange Pi Lite (development board with Allwinner H3 CPU) Android 4.4.2 >> >> On both devices there was only gray rectangle with "Teapot" notification at the bottom for about a sec and then in upper left corner the FPS info (around 60 on both devices), but without any graphic. I have tried taping, dragging etc. >> >> Are Android versions a problem or it could be something else? >> >> Thanks in advance. On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote:Hello,Thanks for the post. I have tried to run apk on 2 devices:1. LG-E440 phone with Android 4.1.22. Orange Pi Lite (development board with Allwinner H3 CPU) Android 4.4.2On both devices there was only gray rectangle with "Teapot" notification at the bottom for about a sec and then in upper left corner the FPS info (around 60 on both devices), but without any graphic. I have tried taping, dragging etc.Are Android versions a problem or it could be something else?Thanks in advance. > > I'd guess that's the issue, as I haven't tested against those older versions of Android and this app links against Android API 21, ie 5.0 Lollipop: > > https:// github.com/ joakim-noah/ android/ blob/master/ samples/ Teapot/ build-apk#L17 > > I'm pretty sure it'd work for your older Android versions if built slightly differently, as I used to support back to Android API 9 until a couple months ago: > > https:// gist.gi thub.com/ joakim-noah/ f475b0b e37b3834b 4e50d689 96b6ee1d# file- ldc_1-1- 0_android_arm- L3438 > > It can be still made to so but I set API 21 as the minimum, because anything older has been declining for some time now: > > http:// blog.davide coppola.com/ 2016/12/ android- version- distribution- history- visualization- 2012-2016/ On Friday, 2 June 2017 at 08:36:49 UTC, Dušan Pavkov wrote:I'd guess that's the issue, as I haven't tested against those older versions of Android and this app links against Android API 21, ie 5.0 Lollipop:I'm pretty sure it'd work for your older Android versions if built slightly differently, as I used to support back to Android API 9 until a couple months ago:It can be still made to so but I set API 21 as the minimum, because anything older has been declining for some time now: https:// github.com/ joakim-noah/ android/blob/ master/ samples/ Teapot/ src/com/ sample/teapot/ TeapotNative Activity.java This is needed because this sample app demonstrates using JNI to call the Java functions showUI and updateFPS, to send the framerate from D to the Java functions to display at the top left. I will note the Android 5.0 requirement on the release, thanks for reporting.