Hi,
last week I ported my Internet Tools
(http://benibela.de/sources_en.html#internettools) to Android
e.g.:
uses simpleinternet;
Memo2.Lines.text := retrieve(edit1.text);
or if you need the headers:
uses androidinternetaccess;
var internet: TAndroidInternetAccess;
begin
internet:=TAndroidInternetAccess.create;
Memo2.Lines.text := internet.get(edit1.text);
Memo1.Lines.Assign(internet.GetLastHTTPHeaders);
internet.free;
end;
Benito
On 05/22/2013 03:31 PM, 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
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus