Recent

Author Topic: Android Controls for Lazarus  (Read 16773 times)

simonsayz

  • New Member
  • *
  • Posts: 27
Android Controls for Lazarus
« on: September 18, 2013, 08:30:10 pm »
Android control lib for lazarus.

Some basic implementation.
 - Form, Label, Edit,
 - OpenGL ES v1,v2
 - Camera ...

ref. http://blog.naver.com/simonsayz/120198362100
 



Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1249
Re: Android Controls for Lazarus
« Reply #1 on: September 19, 2013, 12:59:52 am »
Android native control library.

Very nice, I was looking through your YouTube samples the other day, good results.

Many thanks for sharing your work :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: Android Controls for Lazarus
« Reply #2 on: September 19, 2013, 12:42:07 pm »
Great work!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

joseme

  • Full Member
  • ***
  • Posts: 128
    • Logosoft sistemas
Re: Android Controls for Lazarus
« Reply #3 on: September 19, 2013, 02:31:26 pm »
 :) Thank you!
un aporte a la comunidad:
http://pascalylazarus.blogspot.com/

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Controls for Lazarus
« Reply #4 on: September 19, 2013, 06:18:14 pm »
wow! No, WOOOOOOOOOW!!! :o

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Android Controls for Lazarus
« Reply #5 on: September 20, 2013, 03:38:19 pm »
Well,
        I mostly gave up on Lazarus for tablet apps. Great violence is done to the Delphi concept of ease of use when it takes a week in a room to get a Lazarus app running on Android. Sure there will always be good reasons for a bad result.
Now this thread actually got an Android app to work one time within in an hour most of which was just download time. Optimistically I thought it might actually work a second time. It seems it is very dependent on the Lazarus IDE status.
After it worked the first time I added a component to the Lazarus palette basically a component of mine that blinks a simulated led. After the Lazarus IDE recompiled I was hoping the included example app might still compile after a component installation using Win7_64 Lazarus v1.0.12
Wrong
The error message is below.

PPU Loading C:\lazarus\fpc\2.7.1\units\arm-android\rtl\system.ppu
PPU Loading C:\lazarus\fpc\2.6.2\units\arm-android\rtl\system.ppu
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.6.2\units\arm-android\rtl\system.ppu





Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Controls for Lazarus
« Reply #6 on: September 20, 2013, 04:55:08 pm »
Got a drawing and layouting issue. On my emulator, which is set to quite a small size screen (and resolution), only parts of the whole app can be seen. On my device (Xiaomi MI-2S), I can see there are a lot of buttons on the main screen. But the captions (including text edit) are drawn in lower half. I'll post some screenshots later.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Controls for Lazarus
« Reply #7 on: September 20, 2013, 04:56:03 pm »
Quote
PPU Loading C:\lazarus\fpc\2.7.1\units\arm-android\rtl\system.ppu
PPU Loading C:\lazarus\fpc\2.6.2\units\arm-android\rtl\system.ppu
fcllaz.pas(0,0) Fatal: Can not find system used by fcllaz, ppu=..\..\fpc\2.6.2\units\arm-android\rtl\system.ppu
Your fpc.cfg must be wrong, as you let the compiler found units compiled both both 2.6.2 and 2.7.1.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1469
Re: Android Controls for Lazarus
« Reply #8 on: September 20, 2013, 06:25:22 pm »
Hi Picstart,

Hint: only install new component when a windows project is open... (close the cross-android project!)

Greetings!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Android Controls for Lazarus
« Reply #9 on: September 20, 2013, 11:30:30 pm »
Thanks jmpressoa. At least I have some information about the issue. I feel Lazarus is becoming unpleasant to use. I hate Lazarus oozing out of a contained file folder Lazarus into users application who knows where else it oozes out to. Anyway it looks like the failure to do what you suggest has the consequence of rendering an hour's work useless. If Lazarus would stay contained within a folder a second copy could be used for Android exclusively. I know there will be a good explanation of why the unpleasant feature of oozing out of the Lazarus file folder is valuable. Like saving megabytes on a 3 gigabyte disk. Ease of use ( the best reason Delphi was successful ) seems to be getting forgotten as more and more obtuse steps have to be learned to get Lazarus just to compile. FPC 2.7.1 is needed for android but it's not the fpc most use ...the inter dependencies and the single point of failure consequences are alarming.   It is just getting frustrating.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Android Controls for Lazarus
« Reply #10 on: September 21, 2013, 12:01:46 am »
I think your frustrations are partly due to not completely understanding the Lazarus architecture. I haven't worked with Android, so no opinion about that part.

Delphi "oozes" into the registry to store its settings.
Lazarus, being cross platform, does not use the registry and uses a directory (the "primary config path"/directory). It correctly uses the OS specified directory for this (e.g. somewhere under c:\users\... for Windows Vista+).

This arrangement allows seamless side by side installation of multiple Lazarus instances that don't interfere with each other at all - as long as you use separated config dirs and start Laz with the right --primary-config-path parameter to point to this dir.

E.g. fpcup uses this to create entirely self-contained FPC+Laz instances - no need to even mess with the PATH.

Good luck - reading about Android development on the forum and wiki, it seems the amount and variability of the components does lead to a lot of complexity..
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android Controls for Lazarus
« Reply #11 on: September 21, 2013, 07:51:00 am »
Quote
I think your frustrations are partly due to not completely understanding the Lazarus architecture
and the release engineering ;) (continued below)
Quote
FPC 2.7.1 is needed for android but it's not the fpc most use
understanding what development/snapshot version means would stop you from frustrating. 2.<an odd number>.<whatever> is a development version, that means everything there is not stable, including Android support. It's available for those who would like to help development by testing and reporting bugs, not for production use, despite it might be possible for most small projects. Wait for final release if you don't want to be part of those testers.

zariq

  • Full Member
  • ***
  • Posts: 107
Re: Android Controls for Lazarus
« Reply #12 on: September 24, 2013, 09:45:00 pm »
Has somebody built the compiler using the instructions on Simon's blog? I keep getting error
 
make: *** no rule rule to make target 'clean'. stop.

thanks.

simonsayz

  • New Member
  • *
  • Posts: 27
Re: Android Controls for Lazarus
« Reply #13 on: September 26, 2013, 11:40:04 pm »

When getting Error :  r25567 ~

Temp. Solution
ref. http://blog.naver.com/simonsayz/120198362100



halflifezy

  • Jr. Member
  • **
  • Posts: 61
Re: Android Controls for Lazarus
« Reply #14 on: October 15, 2013, 05:20:38 pm »
Android control lib for lazarus.

Some basic implementation.
 - Form, Label, Edit,
 - OpenGL ES v1,v2
 - Camera ...

ref. http://blog.naver.com/simonsayz/120198362100

does it no 32bit version?