Page 1 of 1

Dropbox issue

Posted: Thu Dec 10, 2020 8:58 am
by Thundertaco25
Hey guys!

So, I've been working on my Sudoku app for a while now and made some great progress, but I've hit yet another issue (surprise surprise!)

I've added dropbox connectivity, so you can send sudokus to other people (awesome!), and while it's working on my laptop when I'm testing it, it's not working when I move it over to my android. This is the code I've got going on for uploading sudokus to dropbox, more of less:

Code: Select all

global DBToken

on mouseUp
   put "/UploadedSudokus/" into folderPath
   dropboxListFolder DBToken, folderPath, false, false
   put it into testVar
   -- do other stuff and process it from here
   end mouseUp
For some reason this is 100% function running on my laptop, but for my phone it's not working. I can confirm that the folderPath is working fine, but once it gets to the dropboxListFolder (or any dropbox related function I'm trying to run on my phone), it just hangs and fails...

I've set up my standalone application settings to sign for development only, and told it that it requires internet, and while I can't imagine it needing anything else, I've been wrong plenty of times before (at this point I'm probably more statistically likely to be wrong than right, but hey - that's how you learn!)

Does anyone know if there's something weird happening with the code, or if it just doesn't work at all with android, or if there's another solution around?

Looking forward to hearing from everyone!

Thanks in advanced!

Re: Dropbox issue

Posted: Thu Dec 10, 2020 2:36 pm
by simon.schvartzman
HI @Thundertaco25, I haven't try it but I would suggest to remove the last backslash in

Code: Select all

put "/UploadedSudokus/" into folderPath
is just a guess and if it works then I will have a hard time explaining the difference between the behaviour on the laptop and on Android but that would be another story.

Good luck and please report back

Re: Dropbox issue

Posted: Thu Dec 10, 2020 3:21 pm
by Mikey
did you include the dropbox library in your standalone?
File->Standalone Application Settings->Inclusions
Then make sure Dropbox Library is checked.

Re: Dropbox issue

Posted: Thu Dec 10, 2020 7:16 pm
by jacque
On Android you need two internet permissions. Besides adding internet to the Inclusions make sure you've also ticked the Internet checkbox in the Android pane in standalone settings.

Android is case sensitive so be sure to always use the same form of the folder name in the script.

Use specialFolderPath("documents") to provide a complete file path to the folder. I'm thinking this is probably the main issue. The documents folder is the only writeable location on mobile so the files have to go there. The file structure on Android won't match what you see on the computer, but you can use the documents folder on your computer to store the files if you don't want to branch the code by platform.