Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Kushal V.
11 years agoNew member | Level 1
Sync Photos folder with dropbox using Xmarin Ios
Hello Team,
I'm developing mobile application using xamarin forms.
I need to do a sync with dropbox of photos, database and folder.
I have used Dropbox Sync & DataStore component.
I have done with single file sync.
But my scenario is like that, Suppose I'm capturing photo from app and when I save it in folder as well as doing entry in sqlite database. So I want that that new photo sync with dropbox. So my main concern is that captured photo save in app folder as well as sync with dropbox app folder. So when I open my dropbox and go into app folder, I'm able to see that captured photo.
I'm using Xmarin Technology.
10 Replies
Replies have been turned off for this discussion
- Steve M.11 years ago
Dropbox Staff
I'm not sure I understand your question. Could you share the code you've written so far and where you ran into trouble?
I should also point out that the Sync and Datastore APIs have been deprecated. You might instead want to use the .NET SDK for API v2.
- Kushal V.11 years agoNew member | Level 1
Hello Steve,
Thanks for your quick replay.
I want to share my mobile camera roll folder with dropbox as well as Sqlite database. Would you please assist me what I need to do for this.
I have used Xamarin Technology.
- Kushal V.11 years agoNew member | Level 1
Hello Steve,
Would you please assist me best way for sync with dropbox for xamarin ios technology.
- Steve M.11 years ago
Dropbox Staff
I'm not sure how to help you. It seems like maybe you haven't started writing code yet? https://www.dropbox.com/developers will tell you all about the platform. In particular, I would think you want the .NET SDK, given that you're using Xamarin.
- Kushal V.11 years agoNew member | Level 1
Hi Steve,
I have created app in console and give you sample code here.
[assembly: Xamarin.Forms.Dependency (typeof (TextToSpeech_iOS))]
namespace DependencyService.iOS
{
public class TextToSpeech_iOS:ITextToSpeech
{
public TextToSpeech_iOS () {}
UINavigationController navController;
UIWindow window;
const string DropboxSyncKey = "<redacted>";
const string DropboxSyncSecret = "<redacted>";
public void UploadPhoto(string text)
{
UINavigationBar.Appearance.TintColor = UIColor.FromRGB (29, 131, 219);
window = new UIWindow (UIScreen.MainScreen.Bounds);
window.BackgroundColor = UIColor.White;
window.Bounds = UIScreen.MainScreen.Bounds;
//var u = new TaskListScreen();
navController = new UINavigationController();
//navController.PushViewController (u, false);
window.RootViewController = navController;
window.MakeKeyAndVisible ();
// DROPBOX STUFF
// The account manager stores all the account info. Create this when your app launches
var manager = new DBAccountManager (DropboxSyncKey, DropboxSyncSecret);
DBAccountManager.SharedManager = manager;
var account = manager.LinkedAccount;
if (account != null) {
DropboxDatabase.Shared.SetupDropbox ();
} else
manager.LinkFromController (window.RootViewController);
}
}
}----------------
Appdelegate.cs
public override bool OpenUrl (UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
var account = DBAccountManager.SharedManager.HandleOpenURL (url);
var filesystem = new DBFilesystem (account);
DBFilesystem.SharedFilesystem = filesystem;
DropboxDatabase.Shared.SetupDropbox ();
return account != null;
} - Kushal V.11 years agoNew member | Level 1
I have used Dropbox Sync & DataStore component. But as per your last replay, that this thing is now deprecated. So as you suggest to use .NET SDK for API v2. But would you please tell me how api v2 will be use in xamarin.
- Steve M.11 years ago
Dropbox Staff
So what's your question? Does your code do what you want it to? If not, what sort of issue did you run into?
Yes, I would suggest using the .NET SDK. I don't understand what you mean by "would you please tell me how api v2 will be use in xamarin." Did you try using the SDK? Did you have trouble?
- Kushal V.11 years agoNew member | Level 1
I have used Dropbox component and I have posted code above. But now you said that is deprecated and suggest me to use api v2. I'm trying to use api v2 in xamarin forms. But would you please let me know how this will be used for authentication.
Second thing, how api v2 will used for database sync and photo library sync.
- Kushal V.11 years agoNew member | Level 1
Steve are you still there?
- Steve M.11 years ago
Dropbox Staff
The .NET SDK documentation is here: http://dropbox.com/developers/documentation/dotnet. There are links from there to samples, a tutorial, and source code. Feel free to ask specific questions once you've written some code.
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!