nl_tokens: Processes a single message as encoded by NativeToJsMessageQueue . java .
pl_tokens: function processMessage ( message ) { var firstChar = message . charAt ( 0 ) ; if ( firstChar == 'J' ) { // This is deprecated on the .java side. It doesn't work with CSP enabled. eval ( message . slice ( 1 ) ) ; } else if ( firstChar == 'S' || firstChar == 'F' ) { var success = firstChar == 'S' ; var keepCallback = message . charAt ( 1 ) == '1' ; var spaceIdx = message . indexOf ( ' ' , 2 ) ; var status = + message . <mask> ( 2 , spaceIdx ) ; var nextSpaceIdx = message . indexOf ( ' ' , spaceIdx + 1 ) ; var callbackId = message . slice ( spaceIdx + 1 , nextSpaceIdx ) ; var payloadMessage = message . slice ( nextSpaceIdx + 1 ) ; var payload = [ ] ; buildPayload ( payload , payloadMessage ) ; cordova . callbackFromNative ( callbackId , success , status , payload , keepCallback ) ; } else { console . log ( "processMessage failed: invalid message: " + JSON . stringify ( message ) ) ; } }