Recent

Author Topic: does laz4android support BeginThread( ) this function?  (Read 11813 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: does laz4android support BeginThread( ) this function?
« Reply #15 on: September 14, 2014, 04:34:46 pm »
if i want to call other Android functions in "Lazarus Android Module Wizard" program,
still need JNI functions?
Certainly, unless the function resides in a system (non-Java) library.

greenzyzyzy

  • Full Member
  • ***
  • Posts: 249
Re: does laz4android support BeginThread( ) this function?
« Reply #16 on: September 14, 2014, 04:38:12 pm »
if i want to call other Android functions in "Lazarus Android Module Wizard" program,
still need JNI functions?
Certainly, unless the function resides in a system (non-Java) library.

en,it is still hard to call Android functions.ah,i have install Lazarus Android Module Wizard.but why it is no GUI lcl?

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: does laz4android support BeginThread( ) this function?
« Reply #17 on: September 14, 2014, 06:45:48 pm »
 Hi greenzyzyzy!

Q1.

Quote
....still hard to call Android functions....

What android function or object you need access? I can try to implement them....

Q2.

Quote
....but why it is no GUI lcl?


Lazarus Android Module Wizard Components are just FCL/JNI .... Soon we will have a form designer!

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

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: does laz4android support BeginThread( ) this function?
« Reply #18 on: September 14, 2014, 07:28:20 pm »
thanks all, i will get some time to learn it. :D

There is no need to learn about ant. All you need to do is:

1> Install ant which is very easy in Linux (apt-get install ant or whatever similar). In Windows it is hard so I simply gave up, and I build my Android project only in Linux since I added dependency to the latest AdMob SDK which is hard to include in the project manually (manually = without ant)
2> To build your project write in the Linux command line:
cd myproject/android
ant debug

If you have a proper set of files it will generate a APK package in the myproject/android/bin directory. If not it will throw an error.

or to make a release build:

ant release

For ant release to work you need to setup in one of the .properties files the path to your key.

You don't need to learn anything else about ant. Or at least I haven't learned and I don't regret =) Less brain space wasted in learning yet another build system.

You do need to learn how to modify all those project files like the manifest file, the .properties files, etc, etc. Google helped me here in every case.

greenzyzyzy

  • Full Member
  • ***
  • Posts: 249
Re: does laz4android support BeginThread( ) this function?
« Reply #19 on: September 15, 2014, 03:56:25 am »
thanks all.

greenzyzyzy

  • Full Member
  • ***
  • Posts: 249
Re: laz4android no idea to use MultiThread?
« Reply #20 on: September 15, 2014, 05:58:25 am »
I don't know whether BeginThread works there (you did have CThreads in your program's uses clause, don't you?), but I use jmpessoa's Android Module Wizard and it has jAsyncProcess which works just fine for multithreading. Certainly the thread handling is different.

it is does not have jAsyncProcess,only have jAsyncTask. right?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: laz4android no idea to use MultiThread?
« Reply #21 on: September 15, 2014, 05:33:12 pm »
I don't know whether BeginThread works there (you did have CThreads in your program's uses clause, don't you?), but I use jmpessoa's Android Module Wizard and it has jAsyncProcess which works just fine for multithreading. Certainly the thread handling is different.

it is does not have jAsyncProcess,only have jAsyncTask. right?
Ah yes, sorry for the name.

greenzyzyzy

  • Full Member
  • ***
  • Posts: 249
Re: does laz4android support BeginThread( ) this function?
« Reply #22 on: September 17, 2014, 12:47:56 pm »
Hi greenzyzyzy!

Q1.

Quote
....still hard to call Android functions....

What android function or object you need access? I can try to implement them....

Q2.

Quote
....but why it is no GUI lcl?


Lazarus Android Module Wizard Components are just FCL/JNI .... Soon we will have a form designer!

Thank you!

when will have form designer?is it in this year?

Daniello

  • Jr. Member
  • **
  • Posts: 64
Re: does laz4android support BeginThread( ) this function?
« Reply #23 on: September 30, 2014, 07:02:36 pm »
Hi, just a comment about multithreading in Android.
Normal fpc threads work in Android if you add cthreads as the first unit of the whole project.
But this requires FPC built from trunk, older versions had a bug and just crash.

 

TinyPortal © 2005-2018