Android Delphi Component is a non-visual component that gives access to Android (all versions starting from Android 2.x are supported) contacts and calendars. You can read/write groups, calendars, events and contacts directly from/to Android device over Wi-Fi from Windows machine.
Component uses Android app (AndroidClient.apk is included in Demo) and Windows component counterpart that acts as a server.
The component supports Delphi 7 and higher versions and works directly with Android using official platform API.
Starting server on port 21113 and waiting for connection. OnClientConnect event is triggered if client is connected. All other events can also be utilized.
AndroidServ := TAndroidServer.Create; AndroidServ.OnLog := OnLog; AndroidServ.OnContactsReceived := OnContactsReceived; AndroidServ.OnContactStatusesReceived := OnContactStatusesReceived; AndroidServ.OnCalendarsReceived := OnCalendarsReceived; AndroidServ.OnCalendarsStatusesReceived := OnCalendarsStatusesReceived; AndroidServ.OnClientConnect := OnConnDisconn; AndroidServ.OnClientDisconnect := OnConnDisconn; AndroidServ.Port := 21113; AndroidServ.LogFilename := '_Log.txt'; AndroidServ.Start;
Adding a new contact "John" with phone number "+555-55-55" and email address "email@gmail.com".
With TAnSContacts.Create(AndroidServ) do
begin
FirstName := 'John';
With NewPhone do
Begin
FieldType := 'Home';
Number := '+555-55-55';
End;
With NewEMail do
Begin
FieldType := 'Home';
Address := 'email@gmail.com';
End;
Store;
End;
Deleting a contact.
SomeContact.Delete;
Download working example (includes Android client app and Windows server).
Note! The trial version of the server component is available upon request.
ADC 1.0
Feb. 22, 2012