Custom HTML responses to client software

This article relates to Anoto Live™ forms 3.5.2 or greater.

Adding custom client responses in Anoto Live™ forms 3.52 differs slightly from previous releases. For one, the new clients do not expect multipart responses. This makes things a lot cleaner and easier to maintain. To override the default response to the iOS, Android or Windows clients, follow these instructions:

<?php class MyHandlers  {  function addEventHandlers(RequestContext $ctx)  {   $ctx->addEventHandler(ResponseEvent::PRE, $this, "onResponsePre");  }   function onResponsePre(ResponseEvent $event)  {   $event->response->message = "<html><body><h1>HELLO WORLD!</h1></body></html>"; // Set your response message   $event->response->messageMimeType = "text/html";   $event->response->type = PenPusherResponse::OK;  } }  ?>

Still need help? Contact Us Contact Us