title: Save a picture of a signature to a file in Rhodes on Android
body: <p>I am trying to implement signature capture using Rhodes targeting an Android tab. I have managed to get the canvas and scribble on it. But am unable to save the signature at a desired location. The <code>signature_uri</code> takes the default location as <code>db/db-files/Image-XXXXXX.png</code>.</p>
  
  <p>This was the code in the sample example:</p>
  
  <pre class="lang-rb prettyprint-override"><code>def signature_callback
  if @params['status'] == 'ok'
    #create signature record in the DB
    signature = SignatureUtil.new({'signature_uri'=&gt;@params['signature_uri']})
    signature.save
    puts "new Signature object: " + signature.inspect
  end
  </code></pre>
  
  <p><strong>In the console I got</strong>:</p>
  
  <pre class="lang-none prettyprint-override"><code>APP| RHO serve: /app/Settings/signature_callback
  I/APP     (  801): I 01/26/2012 11:36:20:236 0000032e                  APP| Params: {"status"=&gt;"ok", "signature_uri"=&gt;"db/db-files/Image_20120126113618375.png", "rho_callback"=&gt;"1"}
  I/APP     (  801): I 01/26/2012 11:36:20:238 0000032e                  APP| *******************ok****************
  I/APP     (  801): I 01/26/2012 11:36:20:238 0000032e                  APP| %%%%%%%%%%%%%%%%%db/db-files/Image_20120126113618375.png%%%%%%%%%%%
  I/APP     (  801): I 01/26/2012 11:36:20:239 0000032e                  APP| App error: can't convert Symbol into Integer
  I/APP     (  801):  lib/rhom/rhom_object_factory.rb:67:in `[]'
  I/APP     (  801): lib/rhom/rhom_object_factory.rb:67:in `initialize'
  I/APP     (  801): apps/app/Settings/controller.rb:34:in `new'
  I/APP     (  801): apps/app/Settings/controller.rb:34:in `signature_callback'
  I/APP     (  801): lib/rho/rhocontroller.rb:91:in `serve'
  I/APP     (  801): lib/rho/rhoapplication.rb:209:in `serve'
  I/APP     (  801): lib/rho/rho.rb:822:in `serve'
  I/APP     (  801): E 01/26/2012 11:36:20:248 00000321                  Net| Request failed. HTTP Code: 500 returned. HTTP Response:         &lt;html&gt;
  I/APP     (  801):             &lt;head&gt;
  I/APP     (  801):                 &lt;meta name="viewport" content="width=320"/&gt;
  I/APP     (  801):             &lt;/head&gt;
  I/APP     (  801):             &lt;body&gt;
  I/APP     (  801):                 &lt;h2&gt;Server Error&lt;/h2&gt;
  I/APP     (  801):                 &lt;p&gt;
  I/APP     (  801): Error: can't convert Symbol into Integer&lt;br/&gt;Trace: &lt;br/
  </code></pre>
  
  <p>Now instead of this database storage, I want to save it in a desired location. Please share your views.</p>