From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5059e1c3870d4dc8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.43.229 with SMTP id z5mr2294904pbl.10.1315676292319; Sat, 10 Sep 2011 10:38:12 -0700 (PDT) Path: m9ni3428pbd.0!nntp.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada on Android? References: <82zkiihpjo.fsf@stephe-leake.org> <657d70d1-2df5-4436-a44c-c97228daff27@l4g2000vbv.googlegroups.com> <82pqjeh3mq.fsf@stephe-leake.org> <82fwk7khyn.fsf@stephe-leake.org> Date: Sat, 10 Sep 2011 13:38:10 -0400 Message-ID: <82wrdgguwt.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:5gawoHo56rgChRvzxtJFuvFiGrs= MIME-Version: 1.0 X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 1b7bf4e6ba084e26b0fa614183 Xref: news1.google.com comp.lang.ada:17918 Content-Type: text/plain; charset=us-ascii Date: 2011-09-10T13:38:10-04:00 List-Id: Brian Drummond writes: > On Wed, 07 Sep 2011 20:15:12 -0400, Stephen Leake wrote: > >> Ada is supposed to be able to target the JVM; also being able to target >> ARM is an orthogonal issue. Targeting the ARM would be useful for >> compiling a new cryptographic library, for example. Totally unnecessary >> for building a music player. > > Not necessary. Perhaps sufficient if you can bind to the API from native > code and write native code callbacks (you can from C/C++ in Android 2.3, > so presumably also Ada). > > I am not suggestion there is anything wrong in targetting the JVM in Ada! > However, if that turns out to be problematic, native code could offer an > alternative approach. Ideally, both will work. Ah. I guess JNI is more complicated/complete than I had thought. I'll have to read more about it. For example, there is now a NativeActivity that allows writing a complete Activity in native code. >> It is possible to do without the GUI builder by writing either Java or >> Ada code that constructs the GUI; we have the same choice in GtkAda. I'm >> going with the recommended approach to make sure I know what its >> advantages are before I give up on it. > > Interesting. As far as I could see, we have to use XML (or the builder) > to control layout. If you can do that in [Java/Ada] instead, that's very > good news! I missed that. Any references to it, or sample projects? I haven't tried it yet, but see http://developer.android.com/reference/android/widget/LinearLayout.html ; you can specify a LinearLayout in code, and add things to it. There are reasons to use the XML; it keeps layout separate from the rest of the code, so specifying portrait vs landscape vs widget is cleaner. But similar separation could be achieved with appropriate subprograms (or should I say "methods"? sigh). Allowing users to specify layout at runtime might be a big advantage. >>> A GTKAda binding to that mess would be nice ... (though probably >>> difficult to impossible) >> >> Why would that be nice? > > Just commonality with other platforms. I hear you about the mess in GTK > underneath! > > If we can develop for Android and use the same product on other platforms > (not just Windows), that would also be nice. Nicer, if the underlying > windowing stuff is cleaner. Yes, cross platform is a nice dream. I had high hopes for GtkAda for that. At the moment, I think QtAda is better, but not by much. I would like to port my Android music App to windows. It may be that the Android windowing classes are built on top of Gtk, in which case it _might_ be possible to port them to Windows. That would be neat. >>> I'll report if/when I have a HelloWorld running. >> >> I'm talking about the full Android windowing Hello World at >> http://developer.android.com/resources/tutorials/hello-world.html. >> _not_ just Ada.Text_IO.Put_line. > > So am I; or rather, the exact equivalent "hello-jni" example from > http://developer.android.com/sdk/ndk/overview.html#samples Ok. I guess I should install the NDK and look at that. -- -- Stephe