Recent

Author Topic: Android agan...  (Read 11079 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8310
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android agan...
« Reply #15 on: May 09, 2015, 10:38:21 am »
I would say native for android means binary code for java virtual machine so compile everything to JVM code and you need add 5> option to the list.
So, haven't you read this and that? (Note that the latter is a bit outdated, there's no need to patch lazarus and fpc if you use recent revisions).
« Last Edit: May 09, 2015, 11:41:23 am by Leledumbo »

Chronos

  • Full Member
  • ***
  • Posts: 214
    • PascalClassLibrary
Re: Android agan...
« Reply #16 on: May 09, 2015, 11:16:48 am »
I would say native for android means binary code for java virtual machine so compile everything to JVM code and you need add 5> option to the list.
So, haven't you read this and url=http://wiki.freepascal.org/FPC_JVM_Android_Development]that[/url]? (Note that the latter is a bit outdated, there's no need to patch lazarus and fpc if you use recent revisions).

Yes, I am aware of the wiki page. But it looks more like research project now then ready to use solution. I don't want to patch FPC as it is way too complicated on linux. And there are too many manual steps which can go wrong. This is one of my problem that I spend too much time solving problems with tools so as consequence don't have enough time to create applications. This is even more significant in payed job where using Delphi taken much less maintenance time in comparison to at that time unfinished Lazarus 0.9.xxx. Simply I don't want to use anything what author wasn't dare to mark as stable. Even in stable software there are bugs. But if software is marked as stable it means at least that API and user interface will not change much until next stable release and software is at least somehow tested in comparison to trunk/nightly/daily builds.

So long story short: make it stable and "one click" solution and I will not be only one who will try to use it.

Are there demonstration applications (apk files) somewhere?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8310
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Android agan...
« Reply #17 on: May 09, 2015, 12:04:56 pm »
But it looks more like research project now then ready to use solution.
It is. The fact that it's a part of trunk only means that it's still in development ;)
So long story short: make it stable and "one click" solution and I will not be only one who will try to use it.
Wait for FPC 3.0.0 and it might happen.
Are there demonstration applications (apk files) somewhere?
Just the apk? How about mine? It uses LCL custom drawn which I don't use anymore in favor of LazAndroidModule due to incompleteness and non-native look and feel. There's another one with LazAndroidModule but it talks to 3rd party web service which I think is already shut down, which means other than the main screen, everything else won't work. Here's one from $(LazarusDir)/examples/androidlcl. My arm-android compiler is compiled with ARM_HF these days because I'm currently playing with Raspberry Pi, which doesn't seem to work well on Android devices including the emulator.

Kamau

  • Jr. Member
  • **
  • Posts: 67
  • Old Delphi programmer
Re: Android agan...
« Reply #18 on: May 09, 2015, 12:27:15 pm »
In 2016 I am planning (God willing) to leave the equatorial regions of Africa, where MB's are still paid bit by bit, and go for a visit to my second home country Holland where I have access to unlimited high speed internet and the possibility to buy a Raspberry-Pi.... which I plan to do.

I realize it is a bit off topic, but can you please tell more about te shortcomings of Raspberry-Pi?

I had hoped to be able to compile Lazarus on an arm platform and compile native applications. (Like I do now in various other Linux versions on 32 and 64 bit.)

And maybe even this would be an alternative?

http://nos.nl/artikel/2034632-deze-computer-kost-maar-9-dollar.html

Just want to stress once more how appreciative and grateful I am for Lazarus!

My last official Delphi was Delphi6. Retired, doing other things with my time and resources, although still programming now and then, not willing to waste money on expensive professional commercial software when it can better be used for needy children and their education.

As somebody asked about my contributions to this community... Most likely not of any importance.

/Kamau

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1406
Re: Android agan...
« Reply #19 on: May 09, 2015, 01:22:04 pm »
Holland + Raspberry Pi(2) + FPC/Lazarus go together very well !!
I can tell you from personal experience  :D

My advice: go for cross-compiling. Makes life a lot easier.

Kamau

  • Jr. Member
  • **
  • Posts: 67
  • Old Delphi programmer
Re: Android agan...
« Reply #20 on: June 26, 2015, 06:26:05 am »
Hello Kamau,

What have you constributed to the community?
We probably live under very different conditions. Here at the equator not everything is as easy and cheap as in Europe with unlimited fast broadband.

But I had the fortunate possibility to download everything and install all again.

Making a very somple program with an edit field, a button and a label. Pressing the button copies the edit text to the label caption.

An apk-file is created when the project is compiled, but when I try to install it, nothing is installed.

Looking in the archive I can see a rather big library file but no executable.

Any suggestion on what I am missing?

/Kamau

renabor

  • Jr. Member
  • **
  • Posts: 67
Re: Android agan...
« Reply #21 on: June 26, 2015, 07:40:29 am »
@kamau
you can try following my step by step guide in order to obtain a fully functional linux box with lazarus, ready to code for android apk

http://forum.lazarus.freepascal.org/index.php/topic,21919.msg168526.html#msg168526

FPC 3.0.5 | Lazarus 1.8 | Ubuntu Gnome 17.10 64bit

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 251
    • Fresh sound.
Re: Android agan...
« Reply #22 on: June 26, 2015, 11:56:01 am »
Hello kamau,

yes we live really under very different conditions.
The time I have to sit in front of my computer is very limited.

But about your problem. Could you tell me which OS you use and maybe also attach the whole project-folder as a zip-file?
I will then try to build it here and compare it with the output of my build.

Regards,
Sam
Linux Mint 19.1, Lazarus 2.0, Windows 7&10, Delphi 7, Delphi 10.3 Rio

Kamau

  • Jr. Member
  • **
  • Posts: 67
  • Old Delphi programmer
Re: Android agan...
« Reply #23 on: June 26, 2015, 03:25:43 pm »
Thank you,

I am trying it on Windows 8.1

The zip-file is attached if such big attachments are allowed....

Got the message that the zip is too big.

Do you really need the total directory? Unzipped 11.4 MB, zipped 5.5 MB

If so I could upload it to my server and send you the link, preferably in direct mail.

I sent you a PM with the link.

/Kamau
« Last Edit: June 26, 2015, 03:32:39 pm by Kamau »

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 251
    • Fresh sound.
Re: Android agan...
« Reply #24 on: June 26, 2015, 04:10:02 pm »
Ok, I got your file.
First, sorry I have no windows 8.

I did compare your files with my files and here are the differences:

In file "generate_debug_key.bat" and "build_debug_apk.bat" I see that you have android-12 and I have android-16
Your file: SET APK_SDK_PLATFORM="c:\laztoapk\downloads\android-sdk-windows\platforms\android-12"
My file:    SET APK_SDK_PLATFORM="C:\laztoapk\downloads\android-sdk-windows\platforms\android-16"

Another potential troublemaker could be the JDK-path.
In my environment, the jdk  is located in C:\Programme\Java\jdk1.8.0_31\bin which does not contain any spaces. In your case its located in "Program Files" which could give troubles within the batch-files.

Sorry I need to go now. Maybe I have more timer later this evening.

Sam

Linux Mint 19.1, Lazarus 2.0, Windows 7&10, Delphi 7, Delphi 10.3 Rio

Kamau

  • Jr. Member
  • **
  • Posts: 67
  • Old Delphi programmer
Re: Android agan...
« Reply #25 on: June 27, 2015, 09:05:33 am »
Thank you for the reply.

I have several Android devices and thought that an earlier issue would be more compatible.

Additionally, I did not select (as far as I can remember) for any particular issue.

If you recommend 16, then I'll try that.

Would you also recommend that I install the program on earlier Windows version.

I saw that you do not use W8 and your info makes me believe that you may even be on a version before XP. Just recommend and I'll install that version on one of my computers.

If you prefer to answer in your native language you can do so in a PM. I have full understanding of the German language. (You may use Swedish, English, German, Dutch or Kiswahili.)

/Kamau

 

TinyPortal © 2005-2018