OneTok Android Titanium Module

I am happy to announce the Ti.OneTok module for Android.  This joins the iOS module created a few months ago.

The Module

The Ti.OneTok module provides a wrapper around the OneTok SDK allowing you to call it from your Titanium Project.  The Ti.OneTok module is available for download from the github project.

The Code

The complete code, documentation, and example app.js is available for download on github

AndroidModule, Documentation, and example

iOSModule, Documentation, and example

Ti.OneTok is available under the Apache 2 license so feel free to fork, extended, and contribute.

The Example

function startRecording(){
    var oneTokOutput = [];

    //This method is called on error
    function onError(e){;
        alert('Errored while recording');

    //This method is called as OneTok processes your
    //speak results. This will be called several times before finish
    function onResults(e){"results=" + JSON.stringify(e));
        //We add the pending results to be used later.
        //You can check the result_type to determine if
        //a valid result has been returned
  "Valid Results=" + JSON.stringify(e));

    //This method is called when the recording session has finished
    function onFinish(e){
        alert('Recording Completed');;

        alert("I'm sorry a network connection is needed to use this module");
                onResults:onResults, //Add callback to process results, called many times
                onError:onError, //Add callback to handle error messages
                onFinish:onFinish  //Add callback to handle when recording has finished

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s