www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Using D in Android App

reply Justice <J.Justice gmail.com> writes:
Is it difficult to create a D business like app and connect it to 
android through java for the interface?

I'd rather create all the complex stuff in D and either use it 
natively through java(I need a UI).

If it is workable, can the same be said for IOS(just recompile 
the D source to the IOS architecture then use it in an IOS app 
for the ui)?
Apr 15 2016
next sibling parent reply Justice <J.Justice gmail.com> writes:
On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it 
 to android through java for the interface?

 I'd rather create all the complex stuff in D and either use it 
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile 
 the D source to the IOS architecture then use it in an IOS app 
 for the ui)?
Anyone?
Apr 18 2016
next sibling parent Michael <michael toohuman.io> writes:
On Monday, 18 April 2016 at 09:38:48 UTC, Justice wrote:
 On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it 
 to android through java for the interface?

 I'd rather create all the complex stuff in D and either use it 
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile 
 the D source to the IOS architecture then use it in an IOS app 
 for the ui)?
Anyone?
If you're treating the Android/iOS applications as purely "client-side", then there's no reason why you can't create a "server-side" application in D using something like vibe.d and then passing data between clients and servers using JSON or similar data interchange formats. That way,you only develop the main server-side application in D, and can communicate with it systems and devices.
Apr 18 2016
prev sibling parent Dan Olson <gorox comcast.net> writes:
Justice <J.Justice gmail.com> writes:

 On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it to
 android through java for the interface?

 I'd rather create all the complex stuff in D and either use it
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile the D
 source to the IOS architecture then use it in an IOS app for the
 ui)?
Anyone?
Short answer is it should work: see "Alpha support for mobile" links on http://dlang.org/download.html Joakim has been pushing Android support and I've been working on getting iOS into the core language. The caveat is that both are alpha support and it is hard to predict when they will be first class D citizens. Speaking for the iOS support, the downloadable compiler is based on 2.068 (LDC 0.17.0) and will move to whatever LDC supports after 1.0.0 is released. I don't know of any problems at this stage, as long as you just want to side load your app. Submitting to the App Store is another matter. It has not been done yet and Apple's requirement to include embedded bitcode is missing currently. -- Dan
Apr 18 2016
prev sibling next sibling parent Laeeth Isharc <laeethnospam nospam.laeeth.com> writes:
On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it 
 to android through java for the interface?

 I'd rather create all the complex stuff in D and either use it 
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile 
 the D source to the IOS architecture then use it in an IOS app 
 for the ui)?
Depending on your budget, you could also look at Corona - Lua can call D easily. I haven't used on Android, but Qt QML may be worth a look (D bindings to QML). Wrt to D on android I would try porting some existing code and see how that goes. I think stuff seemed to work but because you don't yet have so much company then it may be hard to be sure you might not hit some problems till you try.
Apr 18 2016
prev sibling next sibling parent Vadim Lopatin <coolreader.org gmail.com> writes:
On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it 
 to android through java for the interface?

 I'd rather create all the complex stuff in D and either use it 
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile 
 the D source to the IOS architecture then use it in an IOS app 
 for the ui)?
I've added basic Android support to DlangUI library recently. http://forum.dlang.org/thread/cdekkumjynhqoxvmgjze forum.dlang.org DlangUI is cross platform GUI library for D. Your source code will be compiled on Windows, Linux, Mac and Android. https://github.com/buggins/dlangui I hope Android backend will become usable soon (still need to add support of timers, text input (with onscreen keyboard), animation, user messages). iOS support will probably be added in future.
Apr 21 2016
prev sibling parent Joakim <dlang joakim.fea.st> writes:
On Saturday, 16 April 2016 at 04:04:24 UTC, Justice wrote:
 Is it difficult to create a D business like app and connect it 
 to android through java for the interface?
Not difficult, but it hasn't really been done yet. I don't anticipate JNI causing much of a problem, but I need to look into it more.
 I'd rather create all the complex stuff in D and either use it 
 natively through java(I need a UI).

 If it is workable, can the same be said for IOS(just recompile 
 the D source to the IOS architecture then use it in an IOS app 
 for the ui)?
Dan would have to answer the question of how well his iOS support integrates with Obj-C and the iOS GUI. Mobile support is in alpha, meaning it's mostly been used to run a bunch of unit tests in the background. I hope to release a beta for Android in the next couple weeks, along with JNI integration and sample apps. Once that's done, you may consider using D for such an app, if you don't mind using a beta.
Apr 23 2016