Recent

Author Topic: Android development reports  (Read 15695 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Android development reports
« on: March 23, 2012, 08:44:42 am »
23rd March friday - This week was very interresting when it comes to Android development. I fixed a major problem which was a memory corruption due to a double free which caused strange crashes. Now LCL-CustomDrawn can already run large projects like the Virtual Magnifying Glass! (although it still needs improvements to run it perfectly)

This nasty issue was bug 21274

This fix also opens the door to the using the Android style in LCL-CustomDrawn-Android, although there are still issues before this can work perfectly. Right now the font drawing generates some white pixels, and I'm not sure how to fix, maybe with a filter to remove from the drawing those pixels or with a migration to non-native text rendering (too risky right now).

When it comes to the native Android look I advanced a lot the following controls:

*CheckBox
*RadioButton

Although they still work better directly via TCDCheckBox and TCDRadioButton instead of via TCheckBox/TRadioButton in LCL-CustomDrawn

Merged large changes to LazFreeType which implement TextHeight

Implemented the painting of "Erase Background" in all wincontrols in LCL-CustomDrawn. This fixes TNotebook which is now perfect =)

I also started 2 new FPC branches for Android development:

http://p-tools.svn.sourceforge.net/viewvc/p-tools/fpc4android/ with FPC 2.5.1 which requires FPC 2.4.4 to build and is finished

http://p-tools.svn.sourceforge.net/viewvc/p-tools/fpc4android_2_6/ which is FPC 2.6.1 and requires FPC 2.6.0 to build. This one is work in progress, don't use it yet.

I also fixed the Z-order of event handling for overlapping controls, which was previously wrong.

Just thought people would like to know how we are progressing =)

Takeda

  • Full Member
  • ***
  • Posts: 157
Re: Android development reports
« Reply #1 on: March 23, 2012, 09:28:06 am »
Cool.. Excellent works.. Salute for you.. :)
Well, for your branch FPC 2.6.x -> it's mean your FPC 2.6.x didn't yet ready to compiled for android?

Regards,
takeda.
Call me Takeda coz that's my true name.
Pascal coding using Lazarus => "Be native in any where.."

ƪ(˘⌣˘)┐ ƪ(˘⌣˘)ʃ ┌(˘⌣˘)ʃ

Daniel Simoes

  • New Member
  • *
  • Posts: 10
    • DJSystem
Re: Android development reports
« Reply #2 on: March 23, 2012, 01:16:36 pm »
Congratulations... Great work Felipe...


felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android development reports
« Reply #3 on: March 23, 2012, 02:46:26 pm »
Well, for your branch FPC 2.6.x -> it's mean your FPC 2.6.x didn't yet ready to compiled for android?

Exactly, it is not yet ready.

fredycc

  • Sr. Member
  • ****
  • Posts: 264
Re: Android development reports
« Reply #4 on: March 23, 2012, 03:20:08 pm »
Amazing progress  :o Felipe, thanks

Regards

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android development reports
« Reply #5 on: March 30, 2012, 05:28:27 pm »
Second report, 30 march. This week I implemented:

*Support for native menus
*Improved drawing speed by 20% (tested in the Virtual Magnifying Glass) by detecting elements which are fully covered and not drawing them
*Improved the drawing of Android style controls
*Fixed crashes in the emulator
*Fixed TSQLQuery crash

And most importantly: Achieved together with Daniel a full solution to build APK packages in Windows without ant. Putting this together with my precompiled FPC4Android 2.5.1 one needs only the following tools to build LCL Android applications:

*FPC4Android 2.5.1 pre-compiled or compiled by oneself
*Android SDK and NDK
*Lazarus SVN

And ready =) Nothing else is needed and you can already build your APK projects directly in Windows via a batch script without the need for the VirtualBox VM image.

So I am loosing interrested in the VM image, it would be good to know if people still would like a newer version of the VM image, because that one is light years behind the current state, so it needs a large rework. Or if people are happy with the native Windows solution and the VM image is no longer necessary.

Check also the new look of the Android LCL example: http://wiki.lazarus.freepascal.org/File:lcl_android_30_mar.png

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Android development reports
« Reply #6 on: March 30, 2012, 09:05:19 pm »
Felipe, there are some of us eagerly waiting for being able to cross-compile our Lazarus applications from Linux to Android :D :

bambamns

  • Full Member
  • ***
  • Posts: 223
Re: Android development reports
« Reply #7 on: March 31, 2012, 04:24:31 am »
Nice job, keep on moving forward, Felipe - you are making history steps for the future.
Lazarus 1.8.4 + FPC 2.6.4 x86 (rebuild) and Lazarus 2.0, Windows 7 x64, unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android development reports
« Reply #8 on: March 31, 2012, 05:16:47 am »
Quote
Achieved together with Daniel a full solution to build APK packages in Windows without ant.
Yaaaay!!! Something that I really love, bye2 ant!!!

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: Android development reports
« Reply #9 on: March 31, 2012, 08:22:02 am »
felipe, an updated VM image would be still very helpful I think.

CC

  • Full Member
  • ***
  • Posts: 149
Re: Android development reports
« Reply #10 on: March 31, 2012, 10:14:01 pm »
Felipe,

I was delighted to see that windows development for android is quite easy now. Though it is kind of painful to see that you seem to carry the Android platform mostly by yourself. Anyways, congrats!



« Last Edit: April 01, 2012, 02:21:58 pm by CC »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android development reports
« Reply #11 on: April 02, 2012, 03:03:37 pm »
I was delighted to see that windows development for android is quite easy now. Though it is kind of painful to see that you seem to carry the Android platform mostly by yourself. Anyways, congrats!

Well, in terms of writing code indeed I am currently writing 99%+ of the Android support till now, but you should not underestimate the value of the community financial support which helps me push this at a much faster pace then I normally could if I had to do this without only has a hobby (bringing bread to the table takes priority). This comes via direct bounties but also via articles in magazines like Blaise Pascal and FreeX. So it I am not exactly alone on this one =) If you consider that, I think we are doing quite fine and the Android support will only get better and better from now on.

There are code contributors in non-Android sides of CustomDrawn: Giuliano is working in the X11 backend and I had some patches from lainz for the custom drawn controls

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android development reports
« Reply #12 on: April 02, 2012, 03:07:39 pm »
It would be good if people can test the pre-compiled compiler from today for Windows:

https://sourceforge.net/projects/p-tools/files/Free%20Pascal%20for%20ARM/Windows/?

It looks like the build from march30 had some issues, but now they should be fixed.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: Android development reports
« Reply #13 on: April 04, 2012, 11:56:17 am »
Hello! Could you add some changes to add non-native opengl? For example, with the flag "openGL" to remove the Canvas drawing with replacement Opengl on the Java level.

Здраствуйте! не могли бы вы добавить некоторые изменения для добавления ненативного opengl? Например с флагом "openGL" убрать Canvas отрисовку с заменой на Opengl на Java уровне.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Android development reports
« Reply #14 on: April 04, 2012, 03:18:11 pm »
Hello! Could you add some changes to add non-native opengl? For example, with the flag "openGL" to remove the Canvas drawing with replacement Opengl on the Java level.

In the beginning I was using OpenGL because I thought it would be magically faster, but no. It is not faster for 2D graphics, so in the end I found no reason to keep using OpenGL and remove it's usage. jnigraphics can be very efficient.

 

TinyPortal © 2005-2018