Recent

Author Topic: Android programming  (Read 1417 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Android programming
« on: November 07, 2020, 11:46:42 am »
Hi All,

I asked this question on another forum, but due to lack of answers I'll try here.

is there a 101 on Android programming under Windows?

points of interest

What emulator? (Not interested in games)

Setting up Laz

Simple application (Button on form, Hello world)

Thanks in advance.
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

Handoko

  • Hero Member
  • *****
  • Posts: 5154
  • My goal: build my own game engine using Lazarus
Re: Android programming
« Reply #1 on: November 07, 2020, 03:41:24 pm »
Have you check the wiki? It should have all the information you need:
https://wiki.lazarus.freepascal.org/Portal:Android

There are several ways for Pascal-Android programming: LAMW, JVM, Custom Drawn, SDL:
https://forum.lazarus.freepascal.org/index.php/topic,38777.msg264428.html#msg264428

But the most feature-rich is Lazarus Android Module Wizard:
https://wiki.lazarus.freepascal.org/LAMW

LAMW currently does not have detailed documentation but the wiki page in the link above is up-to-date. The hardest thing about Android programming is preparing the cross compiler and setting up toolchain, you should have no problem if you follow the tutorial correctly. You may need a fast internet connection, the size of toolchain you need to download is several GBs.

Once LAMW downloaded, you should read these before start using LAMW:
https://github.com/jmpessoa/lazandroidmodulewizard/tree/master/docs

Some things you need to know are all the components you use in Windows/Linux cannot be used in Android (unless you use CustomDrawn components). LAMW provides its own components. There is no documentation about them but you can find examples how to use them from the source code downloaded in the folder .../demos. And Android screen layout system differs from Windows/Linux. You should search the web or forum to better understand how Android screen layout works.

If you ask questions about LAMW, you may not get answer quickly, we all are new in Android programming. Be patient, the developer regularly checks this forum.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Android programming
« Reply #2 on: November 07, 2020, 07:14:33 pm »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Android programming
« Reply #3 on: November 08, 2020, 12:23:11 am »
Thanks both.
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

shyub

  • Full Member
  • ***
  • Posts: 124
Re: Android programming
« Reply #4 on: November 12, 2020, 08:29:59 am »
I also recently started learning LAMW. On the Russian-language forum, I posted a detailed instruction with an example (Lazarus and Android _LAMW-master_.pdf and WebView.rar). Perhaps it will be useful to you. It is written in Russian, but with the help of Google Translate you can translate into your native language.
https://www.cyberforum.ru/attachments/1164811d1594131342

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Android programming
« Reply #5 on: November 12, 2020, 10:35:24 am »
There are several ways for Pascal-Android programming: LAMW, JVM, Custom Drawn, SDL:
...
But the most feature-rich is Lazarus Android Module Wizard:

Which is of course half the problem: there's no way for the wiki to automatically mark that a certain technique is now the best supported one and that others aren't getting much TLC, and most people contributing to it have a natural reluctance to boost their own pet project by deleting out-of-date text.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018