Intergrate drop box chooser IOS

9 posts, 0 answers
  1. Barend
    Barend avatar
    6 posts
    Member since:
    Aug 2013

    Posted 08 Sep 2013 Link to this post

    Hello Everyone

    I having an issue with the dropbox chooser function, i want to enable it on the my app i call the javascript <script type="text/javascript" src="https://www.dropbox.com/static/api/1/dropins.js" id="dropboxjs" data-app-key="skxxxxxxxxxxin"></script> and the the input tag
    <input  id="dropboxjs" type="dropbox-chooser" name="selected-file" id="db-chooser" data-link-type="direct" style="visibility: hidden;" data-app-key="skxxxxxxxxxxin"/>

    I get an error on the simluator
    {"error": "Origin does not match any app domain"}

    any ideas on coding this so i can choose files ?

    Thank you
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 10 Sep 2013 Link to this post

    Hi Barend,

    This is a generic DropBox error that according to forums I've found is due to incomplete setup of the dropbox service, so check that first outside of Icenium environment.

    Also I'm not sure you can use DropBox sync directly from hybrid mobile app and you can check out the PhoneGap plugin for DropBox here.
    More information on using custom plugins in Icenium is available in our documentation: Working with Custom Plugins.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Gerrit
    Gerrit avatar
    33 posts
    Member since:
    Jul 2010

    Posted 16 Sep 2013 Link to this post

    Hi Guys

    Seems like Dropbox and Google drive needs a webserver in order to work, and because Icenium uses the files as flat files on the disk it will not work.

    Is there someone who used something like dropbox with an Icenium application? I know this is not an issue with Icenium but rather how the sites like dropbox works, but I'm wondering if someone managed to get something like this to work?

    Kind Regards
    Gerrit
  4. Mick
    Mick avatar
    2 posts
    Member since:
    Mar 2014

    Posted 29 May 2014 in reply to Gerrit Link to this post

    Well, I did get things to fully just in the web browser myself so far, using OAuth 2.0 "token" flow for the DropBox core API.  However, the hybrid app blows up both in the simulator and in a real iOS tablet at this point.  I got things to run just a little further a few minutes ago allowing me to sign into the DropBox account on their site from the iOS tablet, by configuring a redirect URI on the DropBox site to be file:///views/authorize.html where "/views/authorize.html" is normally my redirect URI page that handles getting and storing locally the final persistent OAuth2.0 access token.  I am still not properly getting back to my app after the redirect as of now however, and I am working on that.  There is no way I know at this time to make it all work in the Simulator though, because my redirect URI would have to be http://local/views/authorize.html, and the DropBox site prevents you from saving a redirect URI that starts with "http" rather than "https" (unless it contains localhost like it would running locally in your browser).

    Please let me know if anyone got any further interacting with the DropBox API with a hybrid app.
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 02 Jun 2014 Link to this post

    Hi,

    I found a plugin that you might find interesting, but it is for Android only. Maybe it is worth trying it. Here is a link and some instructions how to import it.
    Good luck.

    Regards,
    Zdravko
    Telerik
     

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

     
  6. Gerrit
    Gerrit avatar
    33 posts
    Member since:
    Jul 2010

    Posted 02 Jun 2014 Link to this post

    Hi,

    I see everyone seem to struggle with this, we managed to get this to work for Apple and Android.
    We ended up using oAuth 1.0 for this.

    What we did was, we created a page server side which handles the Dropbox auth, so we do the calls from our app to the server, and then the server returns the data that we display on screen in the app.

    Works perfectly on both Android and iOS. Have a look at DropBox API for oAuth 1.0.




  7. Mick
    Mick avatar
    2 posts
    Member since:
    Mar 2014

    Posted 02 Jun 2014 in reply to Gerrit Link to this post

    Yeah ... a server side redirect page or service using OAuth 1.0a is the only solution I could conceive myself, since I have API calls working great in the browser using either 1.0a and 2.0 actually.  I will let you know how it goes ...
  8. Gerrit
    Gerrit avatar
    33 posts
    Member since:
    Jul 2010

    Posted 02 Jun 2014 in reply to Mick Link to this post

    Ok, glad you managed to get it to work, if you struggle just post here and I will try and help, as mine is working. Good luck!
  9. MobilCTI
    MobilCTI avatar
    1 posts
    Member since:
    Aug 2014

    Posted 15 Aug 2014 in reply to Gerrit Link to this post

    Could you please elaborate how did you solve this issue.  it will be great if you can provide java script examples.
Back to Top