Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Tyhrstan B.1
10 years agoNew member | Level 1
Drop-in Chooser on Windows Phone 8.1
Hi,
On the previous dropbox forum I posted an issue regarding the Dropbox Chooser on Windows Phone.
I stated that when using desktop mode on IE (windows phone) the dropbox chooser works as expected, and only on Mobile mode it did'nt work.
I received the following answer on this topic:
Hi There,
I just tested and can't seem to get the chooser to work in windows phone 8, even with desktop mode enabled. (Though desktop mode does bypass our check). The trouble seems to be in how the windows phone handles popups. Whereas all other browsers correctly open a popup when asked to do so, windows phone seems to interpret our attempt to open a popup as a redirect. Since the user has been redirected away from the page they were on, we can't return the chosen file info to the page in the same context the user last saw that page. I believe the behavior is correct as is.
-Chris
The probable reason might be that I was using Windows Phone 8.1.
You were right about the fact that Windows Phone IE doesn't open a popup in a new window cause this disturbes the flow and every page runs in an isolated mode (so they can't interact). But the 'pop-up' can still interact with the 'parent' page.
I've created a similar construction where a pop-up is used to authenticate a user in linkedin and when the user returns to the 'returnurl' I call window.opener.{function} to invoke a function on the parent page.
And this works on Windows Phone 8.1
17 Replies
Replies have been turned off for this discussion
- Tyhrstan B.110 years agoNew member | Level 1
I'm not sure if this is the case,
The emulator in Visual Studio runs regular Windows Phone 8.1 and I can produce similar results.If you could change:
<button id="clickme">Click me</button> <script> Dropbox.isBrowserSupported = function() { return true; }; $('#clickme').click(function (e) { e.preventDefault(); Dropbox.choose({ linkType: 'direct', success: function (files) { alert('Worked: ' + files[0].link); } }); }); </script>to:
<button id="clickme">Click me</button> <br /> <span id="result"></span> <script> Dropbox.isBrowserSupported = function() { return true; }; $('#clickme').click(function (e) { e.preventDefault(); Dropbox.choose({ linkType: 'direct', success: function (files) { $('#result').text('Worked: ' + files[0].link); } }); }); </script>I think it should work.
- Steve M.10 years ago
Dropbox Staff
That change won't matter on my test device, since the Chooser "popup" (not really) never closes, so that code is never executed.
I was unable to get the phone emulator to connect to the internet on my Surface, so I gave up testing there and used a real device instead. I imagine the emulator uses the latest IE also, so your result doesn't surprise me. (If it works on your Nokia, I would expect it to work on the emulator too.)
- Tyhrstan B.110 years agoNew member | Level 1
I understand you can't make changes if you can't reproduce this behaviour.
The emulator (Virtual Machine) in my Visual Studio doens't run the latest version, I haven't got the latest (Windows Phone 8.1 Update 1) emulators installed from https://dev.windows.com/en-us/develop/downloads, only the Windows Phone 8.1 version.
I hope future updates will make this possible.
Could you tell me wich phone model / OS version your using? Perhaps I can find the same phone and OS version to test my findings.
- Steve M.10 years ago
Dropbox Staff
Okay, we actually managed to reproduce the behavior you're seeing. The alert was indeed the problem, though I don't understand how. (The alert on the background page seems to have blocked the Chooser page from actually closing?)
In any case, this works for us too on Windows Phone 8.1 Update 1. We're trying to track down a Windows Phone 8.1 without any updates to verify that it works on all versions of Windows Phone 8.1. If it does, we'll change the logic in the library to allow use on Windows Phone 8.1.
- Tyhrstan B.110 years agoNew member | Level 1
Hi Steve,
Great that you've been able to reproduce the behaviour.
I believe what might be the reason is that the alert is initiated from the background page, while the background page is not visible.
To my understand the chooser works as following: when you select a file from the chooser the [success] function on background page is invoked and after this function completes the chooser page is 'closed'. probably an alert message can only be shown from and on the active page.I'm looking forward to seeing the changes in library!
- Steve M.10 years ago
Dropbox Staff
We managed to test this on a non-updated Windows Phone 8.1, and the Chooser works fine there too.
An update to the JS library should come out early next week, at which point the Chooser should just work by default on Windows Phone 8.1. Thanks much for pointing this out and hanging in there while we tested!
- Tyhrstan B.110 years agoNew member | Level 1
Hi Steve,
That's great news! I'm already seeing the updated version.
I'm glad I could help out.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!
Related Content
- 4 years agoAnonymous