Results 1 to 10 of 24

Thread: Pascal on Android: I made it work!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Ingemar View Post
    How about the rumored "low level" APIs, C APIs into Android?
    They are available, but there are no Pascal header translations for that - at least not that I know of. Also, the C APIs aren't really for usual GUI app development, they are designed for OpenGL apps or other low-level stuff.
    Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
    Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)

    Programmer: A device for converting coffein into software.

  2. #2
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    @Stoney: Couldn't we just use the low level stuff and then dump the lazarus UI stuff onto that instead of Java as we currently do?

    Historically, anything based on proper code is faster than Java... How many headers would have to be translated to get a minimal system up and running?
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  3. #3
    Quote Originally Posted by code_glitch View Post
    @Stoney: Couldn't we just use the low level stuff and then dump the lazarus UI stuff onto that instead of Java as we currently do?

    Historically, anything based on proper code is faster than Java... How many headers would have to be translated to get a minimal system up and running?
    That sounds so right to me. If I can only get UI events in some decent way, I can do the output though OpenGL.

  4. #4
    Well, I've looked into it. The android-ndk contains a file STABLE-APIS.html which says the following:

    Starting from API level 9, it is possible to entirely write an Android
    application with native code (i.e. without any Java). That does not mean
    that your code does not run inside a VM though, and most of the features
    of the platform will still need to be accessed through JNI.
    So there is some basic functionality to create native applications. However, most of this is a JNI wrapper so it's not much better in terms of performance to do it natively. Also note that only the high-level parts of the operating system are created in JAVA and run in a highly optimized Dalvik VM, so there isn't THAT much to gain anyway. Any performance critical part is natively coded.

    They are available, but there are no Pascal header translations for that - at least not that I know of. Also, the C APIs aren't really for usual GUI app development, they are designed for OpenGL apps or other low-level stuff.
    That is true. It's also the reason why I'd choose Java instead of pascal to develop normal apps. It's a huge amount of work to make all UI API's available to pascal and the benefits are not significant. When coding games however, it's actually worth some effort to get maximum performance.

    I'm actually playing with this a little, to see if I can get a pascal game running on my android device. Today I played with JNI, which will be a very important part of the puzzle. I'll keep you guys posted and I might write an article if I have got something interesting to share. In the meantime, I can use all the advice and bits of info you can give me. For example, how does one do game audio on an android device
    Last edited by chronozphere; 29-10-2011 at 10:44 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Lightbulb

    You know Cooper (oxygene for java) isn't such a bad product and it doesn't cost such a fortune as Delphi does. Maybe it would be worth it to ask to get on the beta for it? RemObjects does intend to support the Android platform directly so perhaps it would help streamline any Android development.

    Just a thought.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6
    Quote Originally Posted by WILL View Post
    You know Cooper (oxygene for java) isn't such a bad product and it doesn't cost such a fortune as Delphi does. Maybe it would be worth it to ask to get on the beta for it? RemObjects does intend to support the Android platform directly so perhaps it would help streamline any Android development.

    Just a thought.
    Project Cooper does indeed support Android directly - I have tried some of the sample projects that comes with it and they compile and run on my Android tablet...yay!

    This is even on the beta version too

    Just send an email to:

    marc hoffman (mh@remobjects.com)

    and he should fix you up...

    cheers,
    Paul
    Last edited by paul_nicholls; 30-10-2011 at 10:02 PM.

  7. #7

  8. #8
    Oh that's pretty cool. Nice it works well, even in the beta version.

    I'm not sure whether I will use it since I'm comfortable with JAVA. I only truely benefit from pascal when it is actually compiled.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •