Dropbox issue

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Thundertaco25
Posts: 1
Joined: Wed Dec 09, 2020 12:05 pm

Dropbox issue

Post by Thundertaco25 » Thu Dec 10, 2020 8:58 am

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!

simon.schvartzman
Posts: 665
Joined: Tue Jul 29, 2014 12:52 am

Re: Dropbox issue

Post by simon.schvartzman » Thu Dec 10, 2020 2:36 pm

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
Simon
________________________________________
To ";" or not to ";" that is the question

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Dropbox issue

Post by Mikey » Thu Dec 10, 2020 3:21 pm

did you include the dropbox library in your standalone?
File->Standalone Application Settings->Inclusions
Then make sure Dropbox Library is checked.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7391
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Dropbox issue

Post by jacque » Thu Dec 10, 2020 7:16 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply