This is a migrated thread and some comments may be shown as answers.

Intergrate drop box chooser IOS

8 Answers 63 Views
AppBuilder Windows client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Barend
Top achievements
Rank 1
Barend asked on 08 Sep 2013, 02:50 PM
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

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Sep 2013, 02:39 PM
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.
0
Gerrit
Top achievements
Rank 2
answered on 16 Sep 2013, 07:32 AM
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
0
Mick
Top achievements
Rank 2
answered on 29 May 2014, 08:29 PM
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.
0
Zdravko
Telerik team
answered on 02 Jun 2014, 08:33 AM
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!

 
0
Gerrit
Top achievements
Rank 2
answered on 02 Jun 2014, 08:55 AM
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.




0
Mick
Top achievements
Rank 2
answered on 02 Jun 2014, 01:33 PM
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 ...
0
Gerrit
Top achievements
Rank 2
answered on 02 Jun 2014, 05:33 PM
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!
0
MobilCTI
Top achievements
Rank 1
answered on 15 Aug 2014, 03:04 PM
Could you please elaborate how did you solve this issue.  it will be great if you can provide java script examples.
Tags
AppBuilder Windows client
Asked by
Barend
Top achievements
Rank 1
Answers by
Steve
Telerik team
Gerrit
Top achievements
Rank 2
Mick
Top achievements
Rank 2
Zdravko
Telerik team
MobilCTI
Top achievements
Rank 1
Share this question
or