title: Dropbox Saver / Chooser drop-in with PhoneGap / Cordova or Sencha Touch
body: <p>I'm trying to integrate the new dropins inside a Sencha Touch application and so I follow the tutorial on dropbox api documentation.</p>
  
  <p>Integration instructions seems as simple as this :  </p>
  
  <ul>
  <li>Add the script to their API in the index.html, before my app script :  </li>
  </ul>
  
  <pre>
  &lt;script type=&quot;text/javascript&quot; src=&quot;https://www.dropbox.com/static/api/1/dropins.js&quot; id=&quot;dropboxjs&quot; data-app-key=&quot;my_api_key&quot;&gt;
  </pre>
  
  <ul>
  <li>Create a simple Sencha component with the a tag in it, for instance :  </li>
  </ul>
  
  <pre>
  {
      xtype: 'field',
      label: 'Dropbox',
      html: '&lt;a href=&quot;res/icons/icon-64.png&quot; class=&quot;dropbox-saver dropbox-dropin-btn dropbox-dropin-default&quot;&gt;&lt;span class=&quot;dropin-btn-status&quot;&gt;&lt;/span&gt;Save to dropbox&lt;/a&gt;'
  }
  </pre>
  
  <p>This will render as the desired dropbox button, however, clicking on it either does nothing or simply displays the icon from the href. I know this has to do with the fact that i'm suppose to put a url to the file but I don't see what to put in there, as my app is gonna be wrapped with phonegap and deployed on a phone...</p>
  
  <p>I can see several options though :  </p>
  
  <ul>
  <li>Use a <strong>webserver</strong> : upload my local file to it, send back the url and pass this url to dropbox button </li>
  <li>Use a <strong>complete url</strong> starting with file:// but I think it won't work as you need to register an app on the dropbox console, with a domain name.</li>
  <li>Maybe I could use the <strong>HTML5 File API</strong> somehow to pass an absolute url, but i'm not really confident about this one either</li>
  <li>Choose <strong>another dropbox API</strong> which would be better suited for the task ? Maybe sync</li>
  <li>Use the <strong>Phonegap sync plugin</strong>, which is not mature I think, and as only iOS and Android support</li>
  <li>Another solution ?</li>
  </ul>
  
  <p>Any tips or pointer to get this integration to work would be great.</p>