Home Can't use JThread in Delphi Android
Reply: 0

Can't use JThread in Delphi Android

هادی فرید
1#
هادی فرید Published in 2018-01-12 12:03:39Z

I want to use JThread instead of TThread in Delphi Android. My code is:

var
  r: TRunnable;
  t: JThread;
begin
  r := TRunnable.Create(procedure() begin ... end);
  t := TJThread.JavaClass.init(r);
  t.start;
end;

This code not works. I tried using TRunnable.Start and it worked, but when I click on a button or when any changes apply to the App, an ANT (Application not responding) showing. Any way to run a procedure in JThread in Delphi on Android?

Sorry for my bad English.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.318173 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO