Freebasic to Java translator for Android?

For other topics related to the FreeBASIC project or its community.
lassar
Posts: 302
Joined: Jan 17, 2006 1:35
Contact:

Freebasic to Java translator for Android?

Postby lassar » Jan 20, 2016 14:33

According to what I has researched, Android apps use java.

Has anyone done a Freebasic to Java translator for Android?
St_W
Posts: 1492
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Freebasic to Java translator for Android?

Postby St_W » Jan 20, 2016 15:42

Android apps also can be written in C/C++ (using NDK), so no need to translate to Java.

There have been already successful ports of FB to Android (without gfxlib, however), just search this forum.
caseih
Posts: 1504
Joined: Feb 26, 2007 5:32

Re: Freebasic to Java translator for Android?

Postby caseih » Jan 20, 2016 17:26

Such a port of FB (native binary on Arm on Android) is cool for some, but probably fairly useless for most as it presently stands. Indeed if you think you can write an app in FB for Android right now, I you'll be quite disappointed. Though FB can make binaries that would run on Android, there's the issue of interfacing with the GUI classes, which are all in Java. I'm sure an FB compiler could be made that could emit Java, similar to how it now can emit C code. However that would be a fairly monumental task, and the entire runtime library would have to be ported to Java as well.

There are several non-Java systems that are being used to make full Android (and iOS) apps right now. I can think of three systems right now. Dot-net based development using some commercial tools from Xamarin, Python-based development using the completely free system Kivy, or Javascript-based "hybrid" app development using a framework like Ionic.

Of these non-Java options, I certainly doubt that the Dot Net or the Javascript ones will appeal to FB programmers. Kivy might work out for some. Python is a fairly easy language to get into and development is extremely fast once you get into it.
St_W
Posts: 1492
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Freebasic to Java translator for Android?

Postby St_W » Jan 20, 2016 21:20

Of course, as the gfxlib hasn't been ported to Android, one has to use different libraries for accessing the GUI.
One example one could use is SDL.
There are also other non-Java Android development platforms like Qt.
lassar
Posts: 302
Joined: Jan 17, 2006 1:35
Contact:

Re: Freebasic to Java translator for Android?

Postby lassar » Jan 21, 2016 15:43

Do you think a port of FB to Android with gfxlib will ever be done?

That would be useful in porting present fb programs to android.
caseih
Posts: 1504
Joined: Feb 26, 2007 5:32

Re: Freebasic to Java translator for Android?

Postby caseih » Jan 21, 2016 15:53

FreeBasic does have a backend now that targets Javascript via an existing compiler (called enscriptem I think) that compiles C and C++ to a special subset of Javascript called Asm.js. The runtime library and everything has been ported. Did you see this example from just the other day?
viewtopic.php?f=17&t=24037

Some feel the future of mobile app development is by using web technologies and browser engines (called hybrid apps). Looks like with some work FB could already be used to do this.
JohnK
Posts: 279
Joined: Sep 01, 2005 5:20
Location: Earth, usually
Contact:

Re: Freebasic to Java translator for Android?

Postby JohnK » Jan 22, 2016 4:07

Until fb does that, dont forget qb64, old school qb
viewtopic.php?t=21118

Or basic4android, more like vb6
https://www.b4x.com
caseih
Posts: 1504
Joined: Feb 26, 2007 5:32

Re: Freebasic to Java translator for Android?

Postby caseih » Jan 22, 2016 15:51

b4x looks very interesting. The GUIs produced with the PC version, while portable, seem to be their own unique style. The Android and iOS versions seem to make apps that look indistinguishable from normal Java or Swift apps. In the Android case, the apps are Java; either b4j and b4x emit Java bytecode, or they are interpreters written in Java.

I can see how some people might want FB to be more like B4x. Indeed what made VB6 so popular was this sort of thing.
angros47
Posts: 1628
Joined: Jun 21, 2005 19:04

Re: Freebasic to Java translator for Android?

Postby angros47 » Jan 22, 2016 19:53

qb64 emits c++ code, so on android it would have the same issues of FB

With emscripten, I've already run a game written in FB on my android phone.
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Re: Freebasic to Java translator for Android?

Postby Kot » Jan 22, 2016 20:26

You can try RFO BASIC! - it's an interpreter based on Dalvik Java (not an emitter though, so it's slow) and X-11 Basic that is quite fast and it works on Windows, Linux and Android. And they're both free :)
lassar
Posts: 302
Joined: Jan 17, 2006 1:35
Contact:

Re: Freebasic to Java translator for Android?

Postby lassar » Jan 23, 2016 14:19

Has anyone tried Microsoft's Visual Studio?

It's supposed to create apps for Windows, Android, iOS, and the web.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests