Kofax Mobile SDK API Reference
|
Classes | |
class | VersionTable |
Public Member Functions | |
LocalProjectProvider (Context ctx) | |
LocalProjectProvider (Context ctx, InputStream projectZipStream, IBundleCacheProvider cacheProvider) | |
void | getProject (String version, ICompletionListener< File > listener) |
void | getVariant (String variantName, String version, ICompletionListener< File > listener) |
void | getHighestVersion (String sdkVersion, ICompletionListener< String > listener) |
String | getLatestCachedModelDataBuildInfo () |
void | getProject (final String projectName, final String version, final ICompletionListener< File > listener) |
void | getVariant (final String projectName, final String variantName, final String version, final ICompletionListener< File > listener) |
void | getHighestVersion (final String projectName, final String sdkVersion, final ICompletionListener< String > listener) |
String | getLatestCachedModelDataBuildInfo (String projectName) |
Public Member Functions inherited from IProjectProvider | |
void | getHighestVersion (final String sdkVersion, final ICompletionListener< String > listener) |
void | getProject (final String version, final ICompletionListener< File > listener) |
void | getVariant (final String variantName, final String version, final ICompletionListener< File > listener) |
Protected Member Functions | |
String | getBundleVersion (String projectName) |
String | readVersion (File versionTable) |
String | readVersion (String jsonContent) |
String | sdkVersion () |
Task< File > | getProjectAsync (final String projectName, final String version) |
Task< File > | getVariantAsync (final String projectName, final String variantName, final String version) |
void | finalize () throws Throwable |
A reference implementation of IProjectProvider that uses a project zip input stream, or reads the project zip from assets.
LocalProjectProvider | ( | Context | ctx | ) |
This constructor will create an instance using the default IBundleCacheProvider. This implementation will assume a project zip exists in the root of the project's assets. E.g.IdRegion#getRegionName().zip ("CombinedIDs.zip").
ctx | This context |
LocalProjectProvider | ( | Context | ctx, |
InputStream | projectZipStream, | ||
IBundleCacheProvider | cacheProvider | ||
) |
This constructor allows specification of the project input stream and a IBundleCacheProvider. It's possible when using this constructor to place the project bundle anywhere on, or off the device, by providing its stream here.
ctx | This context |
projectZipStream | An input stream to the project zip file |
cacheProvider | The cache provider used to store files |
|
protected |
Deletes the temporary working file if one exists.
Throwable |
|
protected |
Retrieves the project bundle's version string.
projectName | The name of the project to get the version for |
void getHighestVersion | ( | String | sdkVersion, |
ICompletionListener< String > | listener | ||
) |
void getHighestVersion | ( | final String | projectName, |
final String | sdkVersion, | ||
final ICompletionListener< String > | listener | ||
) |
Get the highest version string that is compatible with the given SDK version
Note: The listener's object parameter will be null, or a string representing the highest compatible version
projectName | The name of the project. This parameter is no longer used and will be ignored. |
sdkVersion | The version of the SDK that must be compatible |
listener | A completion listener. If this is null, no work will be done. |
Implements IProjectProvider.
String getLatestCachedModelDataBuildInfo | ( | ) |
Get the latest model data build information from cached project
Implements IProjectProvider.
String getLatestCachedModelDataBuildInfo | ( | String | projectName | ) |
Get the latest model data build information from cached project
projectName | The name of the project. This parameter is no longer used and will be ignored. |
Implements IProjectProvider.
void getProject | ( | String | version, |
ICompletionListener< File > | listener | ||
) |
void getProject | ( | final String | projectName, |
final String | version, | ||
final ICompletionListener< File > | listener | ||
) |
Get the project bundle for the given version
Note: The listener's object parameter will be a ZIP containing the top-level project files, including the fields.xml, classifier configurations, and cities.zip, and a file listing the available variants
projectName | The name of the project. This parameter is no longer used and will be ignored. |
version | The version of the project |
listener | A completion listener. If this is null, no work will be done. |
Implements IProjectProvider.
|
protected |
void getVariant | ( | String | variantName, |
String | version, | ||
ICompletionListener< File > | listener | ||
) |
void getVariant | ( | final String | projectName, |
final String | variantName, | ||
final String | version, | ||
final ICompletionListener< File > | listener | ||
) |
Get a variant for the given version
Note: The listener's object parameter will be a ZIP containing the variant-specific files
projectName | The name of the project. This parameter is no longer used and will be ignored. |
variantName | The name of the variant |
version | The version of the variant (this should match the same version string retrieved from getHighestVersion(String, String, ICompletionListener) |
listener | A completion listener. If this is null, no work will be done. |
Implements IProjectProvider.
|
protected |
|
protected |
Given the file of the version table, parses the table, and retrieves the version compatible with this SDK version.
Normally, a project bundle will only include a single version. This implementation simply ensures the bundle is formatted properly.
versionTable | The version table |
|
protected |
|
protected |