We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

Forum Discussion

alex w.19's avatar
alex w.19
New member | Level 1
10 years ago

Manual Synchronising across more than one device

Hi,

I must be missing something, I am writing an app in Xamarin C#, the basic requirement is that the app will have access to two folders on Dropbox under the App folder, the first folder is for the specific device, the second folder is a shared folder so that the same app on different devices can share the data.

The first folder works perfectly, backups/restores work without issue, it is the shared folder that I am having trouble with, I worked out that dropbox is working out that the file has changed and uploading the changes, this is no good for me, I need to be able to delete the contents of the shared folder and upload free copies of the data.

Pseudo code.


does the file exist on dropbox

    yes then delete the dropbox copy

    upload a new version of the file completely

This seems to work sometimes, if I log out of both devices it seems to be quite happy to do the upload, but if both devices are connected then it seems to get confused and not work some of the time, I am guessing that the sync api is getting in the way.

All I want to do is copy the file, no fancy syncing e.g. the api keeping an eye on the files and for all the devices to be able to see the same version of the file if that makes sense.

atb

 

alex

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Can you clarify what you mean by "a shared folder so that the same app on different devices can share the data"? If the different devices are connected to the same account, you don't need a "shared" folder. In that case, just using the app folder permission should be sufficient. You can make subfolders inside the app's app folder as necessary, and all devices linked to the same account will see them.

    Otherwise, if you mean you do need to share data across different accounts, then the app folder permission won't be sufficient, as app folders can't be shared, contain shared folders, or be contained in shared folders. In that case, you'll need to use a different permission:

    https://www.dropbox.com/developers/reference/devguide#app-permissions

    Beyond that, I'm not sure I follow your question. First, which SDK are you using? If you're using the Sync SDK, you may want to use the Core SDK instead, as the Sync SDK is deprecated, and the Core SDK gives you more control. 

    In any case, if you still need help, please follow up and post the SDK/version you're using, the relevant code snippet(s), and any errors/output.

About Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 years ago
323 Following

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 or Facebook.

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!