PDA

View Full Version : Freepascal app on Android market!!



paul_nicholls
05-05-2011, 08:35 PM
Hey all,
I have found that 'apparently' someone has gotten freepascal running under Android natively and has an Android app to make freepascal programs directly on an Android device!!

https://market.android.com/details?id=com.n0n3m4.droidpascal&feature=search_result

cheers,
Paul

chronozphere
05-05-2011, 10:14 PM
Good to see that this is possible. :)

I do think that we need Cooper to unlock the full power of android to pascal developers. Messing with JNI to make Pascal binaries interface with the Java core may work, but it's a tad too messy in my opinion. Unless you have a small amount of classes to interface to, it seems like a no-go.

I'm thinking about doing Android development, after I buy myself a testing device. I'll probably use Java though, unless I find some convincing reasons to use Pascal instead. :P

dazappa
05-05-2011, 10:26 PM
I thought somebody else here had already written some time of media player app in FPC released on the market.

Stoney
05-05-2011, 10:38 PM
Very nice. :)
I've dabbling with Android development myself. The best way to code Pascal apps for Android I found so far is: http://wiki.lazarus.freepascal.org/Android_Interface/Native_Android_GUI
Also with Android 2.3 it is possible to develop native Pascal apps without any direct use of Java.

@dazappa: You're right. BeRo made some Android apps with Pascal. But this app is special because it compiles Pascal code on Android devices.

paul_nicholls
05-05-2011, 10:49 PM
I thought somebody else here had already written some time of media player app in FPC released on the market.

Sorry dazappa, I wasn't clear with my thread title - meant to put in 'compiler' instead of 'app'...

It appears to be a freepascal compiler that works under Android, not an Android app written with freepascal!

cheers,
Paul

paul_nicholls
05-05-2011, 10:51 PM
Good to see that this is possible. :)

I do think that we need Cooper to unlock the full power of android to pascal developers. Messing with JNI to make Pascal binaries interface with the Java core may work, but it's a tad too messy in my opinion. Unless you have a small amount of classes to interface to, it seems like a no-go.

I'm thinking about doing Android development, after I buy myself a testing device. I'll probably use Java though, unless I find some convincing reasons to use Pascal instead. :P

Not that I can say much, but I have been messing around with Cooper myself in the beta test :)

I haven't done anything yet as I am still getting around the language differences :D

cheers,
Paul

Ingemar
31-05-2011, 08:14 AM
Also with Android 2.3 it is possible to develop native Pascal apps without any direct use of Java.

Then 2.3 it is! I hope you are right, because... well, to comment on your own signature:

Programmer: A device for converting coffein into software.
Java: A device for converting software into coffee grounds.

paul_nicholls
31-05-2011, 12:00 PM
Very nice. :)
I've dabbling with Android development myself. The best way to code Pascal apps for Android I found so far is: http://wiki.lazarus.freepascal.org/Android_Interface/Native_Android_GUI
Also with Android 2.3 it is possible to develop native Pascal apps without any direct use of Java.

Nice! So how does one make Android 2.3 programs using Native Pascal without Java?

cheers,
Paul

code_glitch
31-05-2011, 07:01 PM
Now this is what I call salvation: I was looking into one of those android tabs (read your thread paul, very nice finds) and was very worried I'd end up on the experimental side of compilers or have to revert to C/C++ which isn't my first choice. For me, Java is just NO. plain and simple - no java ever. The only iteration of Java I find 'acceptable' is javascript but propper java on a device: sorry - no...

paul_nicholls
31-05-2011, 08:51 PM
Now this is what I call salvation: I was looking into one of those android tabs (read your thread paul, very nice finds) and was very worried I'd end up on the experimental side of compilers or have to revert to C/C++ which isn't my first choice. For me, Java is just NO. plain and simple - no java ever. The only iteration of Java I find 'acceptable' is javascript but propper java on a device: sorry - no...

I know what you mean, but I have bit the bullet, and am now also learning Java + Eclipse IDE to make some programs for my tablet. This is until I can find something suitable with Pascal and Android...

I have been spoiled with Pascal, Java doesn't even have unsigned types like Byte (unsigned), Word, LongWord, only signed integers! This is causing some pain when trying to convert some Pascal code to Java :(

I am also trying Project Cooper beta, but I am having trouble getting my head around the Delphi Prism syntax :D Also, quite frankly, doing something with Java + Eclipse is rather nice (ignoring the language issues)...Eclipse is very user friendly once you get used to it, mainly hints with errors :) It gives you one or more fixes for errors that you can just click on and implement!!

cheers,
Paul

Ingemar
01-06-2011, 07:51 AM
For me, Java is just NO. plain and simple - no java ever.
I agree with you, totally. Awful language, combining the worst parts of C with poor performance, tedious frameworks and, worst of all, a "purity" attitude that is totally unacceptable.

And I have learned Java. I have used it in education, designed labs using it, and in two commercial projects. I know it well enough to know that it is my enemy. Java, the dark side of programming!

But nothing bad that doesn't have a bright side. If I can write for Android in pure FPC code, I believe that I can outperform the Java crowd in performance (almost without even trying), and the C crowd in productivity. The only thing I fear is that it is as hard to make a working installation as it is for the iPhone. (I have a working iPhone installation, and the process to make a new one, but it was not easy to figure out.)

JSoftware
01-06-2011, 10:43 AM
It's pretty easy to make Android programs using the NativeActivity trick. It requires that huge ant build system, but once set up it generally just works

I have an example here: http://j-software.dk/android.zip
Run lazbuild test.lpi in the jni dir, and then run ant debug/ant
install in the root dir

paul_nicholls
01-06-2011, 11:02 AM
It's pretty easy to make Android programs using the NativeActivity trick. It requires that huge ant build system, but once set up it generally just works

I have an example here: http://j-software.dk/android.zip
Run lazbuild test.lpi in the jni dir, and then run ant debug/ant
install in the root dir

Thanks JSoftware :)

So it looks like I need a arm-linux cross-compiler then for this project?

cheers,
Paul

JSoftware
01-06-2011, 11:09 AM
Thanks JSoftware :)

So it looks like I need a arm-linux cross-compiler then for this project?

cheers,
Paul
Yes precisely

Edit: You need to build a crosscompiler, and you need to get the relevant libraries from the Android SDK

paul_nicholls
01-06-2011, 12:27 PM
Ok, will try and build a cross-compiler, and I already have the android SDK :)

cheers,
Paul

code_glitch
02-06-2011, 01:32 AM
Hmm... ARM cross compiler? Doesn't FPC have about 3 of those anyway?

if this is your first steps in Linux paul, I'd highly recommend a ubuntu 10.10 install, 11.04 is *cough*acceptable but caused me 2 entire reloads grr.,.. I don't know what they did to it but yeah. Oh, and I'm on the Canonical boo! side of things, that also means I hate unity and love Gnome, KDE, XFCE and (YAY) the new Gnome 3!!!! [Although I didn't get it working to good last time X/]

paul_nicholls
02-06-2011, 02:43 AM
Hmm... ARM cross compiler? Doesn't FPC have about 3 of those anyway?

if this is your first steps in Linux paul, I'd highly recommend a ubuntu 10.10 install, 11.04 is *cough*acceptable but caused me 2 entire reloads grr.,.. I don't know what they did to it but yeah. Oh, and I'm on the Canonical boo! side of things, that also means I hate unity and love Gnome, KDE, XFCE and (YAY) the new Gnome 3!!!! [Although I didn't get it working to good last time X/]

Hey code_glitch,
I have dabbled a small bit with Ubuntu (version 9.x I think) + Lazarus in a virtual machine a while back, so I will try Ubuntu again :)

I just wish I had a machine I could install Ubuntu on for real LOL

cheers,
Paul

LeteRefszed
12-12-2011, 08:38 PM
So I had to reset my android device, and when I went to reinstall all my purchase apps, one of them was the OrbLive... It shows up, but wont let me install, and when I did a search for the OrbLive, its not in the market anymore. What to do?

WILL
13-01-2012, 01:36 AM
bump!

Sorry for the long wait to get approved...