onymos-logo

onymosDocKnow.captureImage

To select an image from your device’s album or capture a new image. Returns this image in a format ready to be analyzed by OnymosDocKnow.analyzeForm().

OnymosDocKnow.captureImage(
(mediaURLsArray) => {
/* ------
mediaURLsArray = [
Array of WebviewURLs,
];
------ */
},
(error) => {
console.log(error);
}
);

onymosDocKnow.analyzeForm

To initiate OCR and retrieve an object representing the analysis processes. Pass this object to OnymosDocKnow.getAnalyzeResults().

OnymosDocKnow.analyzeForm(
formType,
appVersion,
imageURIs,
(processObject) => {
/* ------
processObject = [{
formType: Type of form being analyzed,
appVersion: The current version of the app,
analyzeID: The ID used to identify and retrieve this process' results,
transactionID: The ID used to track this process within the Onymos ecosystem
}];
------ */
},
(error) => {
console.log(error);
},
options
);
formType

String

Type of form being analyzed.

appVersion

String

The current version of the app (e.g., “1.0.0”).

imageURIs

Array

Array of image URIs. If multiple images are included, the current implementation of analyzeForm() will only analyze the last image.

formType

String

Type of form being analyzed.

analyzeID

String

The ID used to identify and retrieve this process’ results.

transactionID

String

The ID used to track this process within the Onymos ecosystem.

options
formVersion

String

Specify the specific version of the form to be analyzed. Defaults to the latest version if not provided.

onymosDocKnow.getAnalyzeResults

To retrieve the results of the previous analyzeForm() call.

OnymosDocKnow.getAnalyzeResults(
processObject,
transactionID,
(results) => {
/* ------
results = {
status: One of three status messages,
transactionID: The ID used to track this process within the Onymos ecosystem
data: A JSON object with the results of the analysis.
};
------ */
},
(error) => {
console.log(error);
},
options
);
processObject

Object

The object returned from ‘analyzeForm()’ that contains the necessary data to retrieve the process’ results.

transactionID

String

The ID used to track this process within the Onymos ecosystem.

status

String

One of “processing,” “succeeded,” or “failed.”

data

JSON Object

If the result’s status is “processing” or “succeeded,” the result will contain a data object with the results from the analysis.

onymosDocKnow.getAvailableFormTypes

To return a list of documents associated with your Onymos account.

const availableFormTypes = OnymosDocKnow.getAvailableFormTypes(
appVersion
);
/* ------
availableFormTypes = [
formType,
];

------ */

Think differently about app development

Download our free white paper today to learn how Onymos Features can maximize the value of your developer resources — and shave weeks or months off your development timeline.

Get your free white paper

Overlay