JavaImport for Android

Converts Java .jar files, .class files and folders to Delphi/C++ Builder units for Android.
Imported Android Toast API example:
type
  JToastClass = interface(JObjectClass)
    ['{51734059-CDB1-45F0-815E-5AB1AD644097}']
    {Property methods}
    function _GetLENGTH_LONG: Integer;
    function _GetLENGTH_SHORT: Integer;
    {Methods}
    function init(context: JContext): JToast; cdecl;
    function makeText(context: JContext; text: JCharSequence; duration: Integer): JToast; cdecl; overload;
    function makeText(context: JContext; resId: Integer; duration: Integer): JToast; cdecl; overload;
    {Properties}
    property LENGTH_LONG: Integer read _GetLENGTH_LONG;
    property LENGTH_SHORT: Integer read _GetLENGTH_SHORT;
  end;

  [JavaSignature('android/widget/Toast')]
  JToast = interface(JObject)
    ['{BA203A75-C35C-4CF5-9AF4-9DCCA2C0EBBB}']
    {Methods}
    procedure cancel; cdecl;
    function getDuration: Integer; cdecl;
    function getGravity: Integer; cdecl;
    function getHorizontalMargin: Single; cdecl;
    function getVerticalMargin: Single; cdecl;
    function getView: JView; cdecl;
    function getXOffset: Integer; cdecl;
    function getYOffset: Integer; cdecl;
    procedure setDuration(duration: Integer); cdecl;
    procedure setGravity(gravity: Integer; xOffset: Integer; yOffset: Integer); cdecl;
    procedure setMargin(horizontalMargin: Single; verticalMargin: Single); cdecl;
    procedure setText(resId: Integer); cdecl; overload;
    procedure setText(s: JCharSequence); cdecl; overload;
    procedure setView(view: JView); cdecl;
    procedure show; cdecl;
  end;

  TJToast = class(TJavaGenericImport<JToastClass, JToast>)
  end;

const
  TJToast_LENGTH_LONG = 1;
  TJToast_LENGTH_SHORT = 0;

implementation

procedure RegisterTypes;
begin
  TRegTypes.RegisterType('android.widget.Toast.JToast', TypeInfo(android.widget.Toast.JToast));
end;

initialization
  RegisterTypes;
end.
								

Download and order

Order JavaImport for Android $80,- USD (license for one developer)
Order JavaImport for Android multilicense $240,- USD (license for all developers in company)
Order JavaImport for Android year upgrades $40,- USD (registered users only)
Order JavaImport for Android year upgrades multilicense $120,- USD (registered multilicense users only)

Related links