Secure SQL database. More...
The secure SQL database is part of the BlackBerry Dynamics secure storage feature.
Data stored in the secure SQL database will be encrypted on the device by the BlackBerry Dynamics runtime.
The BlackBerry Dynamics secure SQL database is based on the SQLite library. Encryption is added by BlackBerry Dynamics, transparently to the application.
The secure SQL database cannot be accessed until BlackBerry Dynamics authorization processing is complete.
As well as the secure SQL database, the BlackBerry Dynamics secure store also includes a secure file system.
BlackBerry Dynamics applications access the secure database using replacements for the native android.database
and android.database.sqlite
packages.
To access the replacement classes instead of the native classes, change android.database
to com.good.gd.database
wherever it occurs in the application code. For example, utilize the following import statement.
The replacement packages support the same programming interface as the native packages, with the following exceptions.
LOCALIZED
and UNICODE
collators provided by the native android.database.sqlite
package aren't supported.importDatabase
, see below.getFilesDir
to generate database file paths.public static boolean importDatabase(String srcPath, String destPath)
Use this function to create an encrypted database from a plain SQLite database file. The database file must be in the secure file system, see BlackBerry Dynamics File I/O Package.
After a succesful import, the database can be opened using the openDatabase
method in the android.database.SQLiteDatabase class.
This function would typically be used on an SQLite database that had been retrieved as a single file from an application server.
This function can only be called after BlackBerry Dynamics authorization processing is complete, see under GDAndroid.
true
is returned.false
is returned.The following code snippets illustrate some common tasks.
The above snippet shows opening the database in the contacts.db
file in the secure file system. The database is created if it does not exist already.