Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-08

Delphi for Android

16 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sven Barth

Hello together!

Since Delphi now indeed seems to get an Android port I thought that I'd mention this blog entry by Marco Cantu here as well: http://blog.marcocantu.com/blog/compiling_android_apps_delphi.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29

One can of course argue whether this is more for lazarus-other or not, but maybe we can discuss here how one could improve the development experience with Lazarus when developing for Android (automatic APK building, etc.)

Regards,
Sven

Reply by email

Michael Van Canneyt
to Sven Barth
Sven Barth wrote 9 lines
Hello together! Since Delphi now indeed seems to get an Android port I thought that I'd mention this blog entry by Marco Cantu here as well: http://blog.marcocantu.com/blog/compiling_android_apps_delphi.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29 One can of course argue whether this is more for lazarus-other or not, but maybe we can discuss here how one could improve the development experience with Lazarus when developing for Android (automatic APK building, etc.)

I don't think this is for Lazarus-other.

There are 4 things to be considered:
- How to go about Android: custom drawn (i.e. native code), or using the JVM and the Android API.
- Building the GUI as it is done e.g. with the iOS extension from Joost van der sluis.
- apk building (probably the easiest part)
- Remote debugging with the Android emulator.

It is a huge task, I've had many discussions about it :(

Michael.

Reply by email

Juha Manninen
to Sven Barth: Hello together! Since Delphi now indeed seems to get an Android port I thought that I'd…
Sven Barth wrote
Since Delphi now indeed seems to get an Android port I thought that I'd mention this blog entry by Marco Cantu here as well: http://blog.marcocantu.com/blog/compiling_android_apps_delphi.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29

The article does not say anything about how the GUI layout is done. Does it use the Android's layout system or does it implement its own? Or something else?

Juha

Reply by email

Sven Barth
to Juha Manninen
Juha Manninen wrote 9 lines
On Thu, Aug 15, 2013 at 12:09 PM, Sven Barth wrote: > Since Delphi now indeed seems to get an Android port I thought that I'd > mention this blog entry by Marco Cantu here as well: > http://blog.marcocantu.com/blog/compiling_android_apps_delphi.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29 The article does not say anything about how the GUI layout is done. Does it use the Android's layout system or does it implement its own? Or something else?

Another article a few days back said that it's FireMonkey like on iOS.

Regards,
Sven

Reply by email

Michael Schnell
to Sven Barth
Sven Barth wrote
Another article a few days back said that it's FireMonkey like on iOS.

This was rather obvious in the article: "will have the same set of components and visual controls of its iOS counterpart."

-Michael

Reply by email

Sven Barth
to Juha Manninen
Juha Manninen wrote 8 lines
On Thu, Aug 15, 2013 at 12:34 PM, Sven Barth wrote: > Another article a few days back said that it's FireMonkey like on iOS. I don't even know how FireMonkey does it in those systems. I guess it takes care of both the control drawing and the layout. Somehow it must interact with the Android desktop. I must study the topic a little more. I don't even know how they do it on iOS.

FireMonkey is working more like our CustomDrawn widgetset. And for interaction with the Android desktop they'll need to do the same as we: use JNI.

Regards,
Sven

Reply by email

Michael Schnell
to Sven Barth
Sven Barth wrote
FireMonkey is working more like our CustomDrawn widgetset.

I never got Custom Drawn running, yet (maybe because I insist on using the <here restricted> Lazarus GUI designer).

I need to give it another try.....

-Michael

Reply by email

Sven Barth
to Michael Schnell
Michael Schnell wrote 8 lines
On 08/15/2013 11:50 AM, Sven Barth wrote: > > FireMonkey is working more like our CustomDrawn widgetset. I never got Custom Drawn running, yet (maybe because I insist on using the <here restricted> Lazarus GUI designer). I need to give it another try.....

I got it working at least for Android though at that time the result (I recompiled our Windows Mobile application at work) wasn't that satisfactory. I've yet step-by-step to write bug reports for the problems I noticed.

Regards,
Sven

Reply by email

Michael Van Canneyt
to Sven Barth: FireMonkey is working more like our CustomDrawn widgetset. And for interaction with the…
Sven Barth wrote 16 lines
On 15.08.2013 11:47, Juha Manninen wrote: > On Thu, Aug 15, 2013 at 12:34 PM, Sven Barth > wrote: >> Another article a few days back said that it's FireMonkey like on iOS. > > I don't even know how FireMonkey does it in those systems. I guess it > takes care of both the control drawing and the layout. Somehow it must > interact with the Android desktop. I must study the topic a little > more. I don't even know how they do it on iOS. FireMonkey is working more like our CustomDrawn widgetset. And for interaction with the Android desktop they'll need to do the same as we: use JNI. From memory: Firemonkey is OpenGL based, everything custom drawn.

The OpenGL ensures it runs on all platforms that use OpenGL.

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt
Michael Van Canneyt wrote 21 lines
On Thu, 15 Aug 2013, Sven Barth wrote: > On 15.08.2013 11:47, Juha Manninen wrote: >> On Thu, Aug 15, 2013 at 12:34 PM, Sven Barth >> wrote: >>> Another article a few days back said that it's FireMonkey like on iOS. >> >> I don't even know how FireMonkey does it in those systems. I guess it >> takes care of both the control drawing and the layout. Somehow it must >> interact with the Android desktop. I must study the topic a little >> more. I don't even know how they do it on iOS. > > FireMonkey is working more like our CustomDrawn widgetset. And for > interaction with the Android desktop they'll need to do the same as > we: use JNI. > > From memory: Firemonkey is OpenGL based, everything custom drawn. The OpenGL ensures it runs on all platforms that use OpenGL.

Nevertheless they need to interact with the OS as well to get access to e.g. sensors or other services like SMS and such.

Regards,
Sven

Reply by email

Samuel Herzog

Hi, have a look at my called "laztoapk" . It works for windows but not yet for linux. Help is welcome. Sam

-----Urspr?ngliche Mitteilung-----
Von: Sven Barth
To: "Lazarus mailing list"
Date: Donnerstag, 15. August 2013 11:09:39 GMT+0200 Subject: [Lazarus] Delphi for Android

Hello together!

Since Delphi now indeed seems to get an Android port I thought that I'd mention this blog entry by Marco Cantu here as well: http://blog.marcocantu.com/blog/compiling_android_apps_delphi.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+marcocantublog+%28marcocantu.blog%29

One can of course argue whether this is more for lazarus-other or not, but maybe we can discuss here how one could improve the development experience with Lazarus when developing for Android (automatic APK building, etc.)

Regards,
Sven

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt: The OpenGL ensures it runs on all platforms that use OpenGL. Michael.
Michael Van Canneyt wrote
> From memory: Firemonkey is OpenGL based, everything custom drawn. The OpenGL ensures it runs on all platforms that use OpenGL.

..and might disadvantage it on any platform where OpenGL doesn't work, or connection methods (e.g. any form of desktop sharing) that precludes it.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Marco van de Voort
Marco van de Voort wrote 6 lines
On Thu, Aug 15, 2013 at 01:31:59PM +0200, Michael Van Canneyt wrote: >> From memory: Firemonkey is OpenGL based, everything custom drawn. > The OpenGL ensures it runs on all platforms that use OpenGL. Afaik creating an opengl context or anything with fonts is already not portable.

Maybe, but compared to doing everything yourself for all platforms, solving this is not a lot of work.

Michael.

Reply by email

Martin Schreiber
to Michael Van Canneyt
Michael Van Canneyt wrote 12 lines
On Thu, 15 Aug 2013, Marco van de Voort wrote: > On Thu, Aug 15, 2013 at 01:31:59PM +0200, Michael Van Canneyt wrote: >>> From memory: Firemonkey is OpenGL based, everything custom drawn. >> >> The OpenGL ensures it runs on all platforms that use OpenGL. > > Afaik creating an opengl context or anything with fonts is already not > portable. Maybe, but compared to doing everything yourself for all platforms, solving this is not a lot of work.

AFAIK there is no simple "OpenGL". There are many different implementations all with different extensions, limitations and bugs. Especially pixmap handling, which is important for 2D GUI graphics and often the base of font drawing, is a nightmare on OpenGL. It is difficult to achieve good performance on all devices.

Martin

Reply by email