Recent

Author Topic: Android Module Wizard  (Read 561526 times)

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #990 on: November 12, 2017, 08:53:51 am »
Look at this commit for LAMW:
https://github.com/jmpessoa/lazandroidmodulewizard/commit/53f4605c6f59176eb6176bec78158c2b6ebc2a6d
You could try to apply the changes if this commit .

Or you could use fpcupdeluxe to install all brand new and updated.

I tried above commit, but seem jmpessoa deleted functions including
"function CmpAndroidThemes(p1, p2: Pointer): Integer;"
and " function FindThemeByName(p1, p2: Pointer): Integer;"
but i still copied  all as commit said, but cant solve the problem

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #991 on: November 13, 2017, 04:34:14 am »

Hi m4u!

Please, update your LAMW stuff ... there is a new fix!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

kwer

  • New Member
  • *
  • Posts: 11
  • Its my fortune to have it, its my fate to lose it.
Re: Android Module Wizard
« Reply #992 on: November 16, 2017, 04:36:51 am »
====  How to new a Lamw component? ====
clientsocket := jTCPSocketClient.Create(gApp); // But it doesn't work!!!
clientsocket.Init(gApp);  // Crashed!!!
----------------------------------
Duolong, please render me a fastest horse, I must  leave now!
----------------------------------

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #993 on: November 16, 2017, 05:08:09 am »


Are you off the form?
if not try:

clientsocket := jTCPSocketClient.Create(Self); // <=== changed here...
clientsocket.Init(gApp); 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

llg523

  • Newbie
  • Posts: 2
Re: Android Module Wizard
« Reply #994 on: November 26, 2017, 12:24:33 pm »
Hi jmpessoa,

Thank you very much for your great work!

I would like to try my app by LAMW. I found there is just TCP Client demo, however in my app the phone need to be as a sever, is there any solution? Thanks a lot!

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #995 on: November 26, 2017, 06:36:56 pm »

From google:

http://programminglife.io/android-http-server-with-nanohttpd/

I will try  [TODO] some "nanohttpd" wrapper for LAMW!

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

llg523

  • Newbie
  • Posts: 2
Re: Android Module Wizard
« Reply #996 on: November 28, 2017, 04:11:18 am »
Hi jmpessoa,

Thank you very much for quick response!
If I just want a TCP server while don't need to support http, is there a simple solution?

kwer

  • New Member
  • *
  • Posts: 11
  • Its my fortune to have it, its my fate to lose it.
Re: Android Module Wizard
« Reply #997 on: November 28, 2017, 04:27:01 am »
Hi jmpessoa,  something made me wonder.

(uses fpjson)
procedure TAndroidModule1.jButton1Click(Sender: TObject);
var
   jData : TJSONData;
   jObject : TJSONObject;
   jArray : TJSONArray;
   s : string;
begin
   // create from string
   jData := GetJSON('{"Fld1" : "Hello", "Fld2" : 42, "Colors" : ["Red", "Green", "Blue"]}');  // Crashed!!!

--
----------------------------------
Duolong, please render me a fastest horse, I must  leave now!
----------------------------------

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #998 on: November 28, 2017, 04:40:45 am »

Hello kwer!

Sorry...we dont have native java json support, yet....

You can try  pure  FPC JSON  .... at  fpc\3.1.1\source\packages\fcl-json
[maybe, you will need copy the source to your project folder...]


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

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: Android Module Wizard
« Reply #999 on: November 28, 2017, 07:40:47 pm »
Hi jmpessoa,  something made me wonder.

(uses fpjson)
procedure TAndroidModule1.jButton1Click(Sender: TObject);
var
   jData : TJSONData;
   jObject : TJSONObject;
   jArray : TJSONArray;
   s : string;
begin
   // create from string
   jData := GetJSON('{"Fld1" : "Hello", "Fld2" : 42, "Colors" : ["Red", "Green", "Blue"]}');  // Crashed!!!

--

Include "jsonparser" unit to uses clause.

trevor

  • New Member
  • *
  • Posts: 10
Re: Android Module Wizard
« Reply #1000 on: January 23, 2018, 10:15:02 am »
How to add 2/3/4/5 lines to all items of Android Native ListView?

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #1001 on: January 23, 2018, 04:03:31 pm »

Hello, Trevor!

Can you put here some "draft" picture?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

trevor

  • New Member
  • *
  • Posts: 10
Re: Android Module Wizard
« Reply #1002 on: January 24, 2018, 06:24:45 am »

Hello, Trevor!

Can you put here some "draft" picture?
Hello!
Thank you for your AMW!

I want something just like this :)

jmpessoa

  • Hero Member
  • *****
  • Posts: 1526
Re: Android Module Wizard
« Reply #1003 on: January 24, 2018, 04:20:35 pm »
OK.

Try:

jListView1.Add(Text1|Text2|Text3);

and you can configure  this properties:

TextAlign
TextDecorated
TextSizeDecorated

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

trevor

  • New Member
  • *
  • Posts: 10
Re: Android Module Wizard
« Reply #1004 on: January 25, 2018, 11:32:35 am »
OK.

Try:

jListView1.Add(Text1|Text2|Text3);

and you can configure  this properties:

TextAlign
TextDecorated
TextSizeDecorated
Thanks a lot! :thumbsup:

 

TinyPortal © 2005-2018