[Lazarus] Android and network

Paul Breneman list2010 at BrenemanLabs.com
Wed May 22 16:51:16 CEST 2013


Kjow wrote:
> Hi all,
> 
> I'm trying Android development on Lazarus and it seems to works almost well
> (of course apps run very slowly) and I'm trying to get something trough web.
> 
> Both lnet and synapse can compile for arm-android, but no one can connect
> to the web.
> 
> On AndroidManifest.xml I have the line:
>     <uses-permission android:name="android.permission.INTERNET" />
> 
> The same project compiles and runs well (also lnet or synapse connection)
> on x86_64-win64
> 
> This is the simple code that I run:
> 
> procedure TForm1.Button2Click(Sender: TObject);
> var
>   HTTP: THTTPSend;
> begin
>   HTTP := THTTPSend.Create;
>   try
>     HTTP.HTTPMethod('GET', Edit1.Text);
>     Memo1.Lines.Assign(HTTP.Headers);
>     Memo2.Lines.LoadFromStream(HTTP.Document);
>   finally
>     HTTP.Free;
>   end;
> end;
> 
> There are "tricks" to use these components or it is just not possible at
> now?
> 
> Thank you,
> Kjow

When you get it to work I'd be glad to publish source code here:
   http://www.ctrlterm.com/

The Synapse code there now works for arm-linux.

-- 
Regards,
Paul Breneman
www.TurboControl.com - Hardware and software development services
- Educational programming project for environment monitoring
- Information on using FreePascal for embedded systems




More information about the Lazarus mailing list