Developing and running D GUI app on Android

evilrat evilrat666 at gmail.com
Mon Jan 11 06:26:41 UTC 2021


On Sunday, 10 January 2021 at 18:58:13 UTC, aberba wrote:
> I'm looking to explore running a D application on Android based 
> on Adams previous foundation work. However, I'm not familiar 
> with the Android + D integration so I need some help.
>
> Has any of you successfully done that? Could use a sample code 
> or anything I can use to figure out how to start.

Android itself is just linux under the hood, however the launcher 
starts java process that fires up your activity class (main in 
native languages) from there you just call your native code and 
that's it.

This means
1) you need to build D shared lib
2) make java wrapper in activity to call your code
3) handle your events as if it's java

I did some work in the past for DlangUI[1], you can probably take 
the gradle project[2] with build scripts and the Activity class 
as the starting point, however I have no idea what does arsd libs 
with gui.

Also note that I did it for existing DlangUI code based on 
NativeActivity library which is deprecated for years now, and 
that's why you need proper java wrapper.

[1] https://github.com/buggins/dlangui/tree/master/android
[2] 
https://github.com/buggins/dlangui/tree/master/examples/android


More information about the Digitalmars-d-learn mailing list