Development Dependencies

From InterBase
Jump to: navigation, search


When a native application is build for Android, InterBase expects the following requirements to be set before the application is deployed to the Android Emulator/Device. InterBase works with “android-9” platform targeting ARMv7 devices.

Requirement RAD/Delphi application with FireDAC/dbExpress/ IBX RAD/Delphi applications
with customer database
connectivity
INTERBASE environment variable in application process

InterBase ToGo on Android needs to know the application folder where it can write its temporary files and look for license and other supporting database files. For this, the application needs to copy the InterBase assets to a writable location, and, set INTERBASE env. variable to that location. Typically, this is the "external" storage area for Android NDK apps.

For e.g. <package_name> might be "com.example.native_activity"

For e.g. /data/data/<package_name>/files

Set INTERBASE env. variable to "/data/data/<package_name> /files/interbase"

This is automatically set by these database components. No need for the application to do anything specific. Application needs to set this in their initialization code before calling any InterBase api.

You may want to add code similar to the following in your application:

{$IFDEF ANDROID}
procedure
SetInterBaseVariable;
var
M: TMarshaller;
begin
setenv('INTERBASE',
M.AsUtf8(GetFilesDir +
PathDelim +
'interbase').ToPointer, 1);

 end; 
 {$ENDIF }
AndroidManifest permissions

InterBase requires certain permissions set in the AndroidManifest file.

INTERNET: Allows applications to access network sockets. If you are building Client/Server apps accessing remote InterBase databases, this is a must have. This is also required by InterBase "call home" silent license registration.

READ/WRITE EXTERNAL STORAGE: This is the external storage location where InterBase files (including your database files) are delivered for applications to perform read/write operations.

See Uses Permissions for further details.

Permissions:

  • Internet
  • Read external storage
  • Write external storage
See Uses Permissions for further details.

Permissions:

  • Internet
  • Read external storage
  • Write external storage
Linking dependency on external NDK libraries

In order to support C++ exception handling used by InterBase, the developer needs to link the libstlport_static.a with their application.

libstlport_static.a is available at <NDK>/sources/cxx-stl/stlport/libs/armeabi-v7a/

This is automatically set by these database components. No need for the application to do anything specific. Application needs to request the linker to include this library.

Advance To