0

I am trying to open the dropbox App from my app. Here I can link and upload the files into the dropbox correctly. I have a link button to dropbox in my app, on clicking this I can be redirected to the dropbox app, I am using the code below.

if (!UIApplication.SharedApplication.OpenUrl(NSUrl.FromString("testscheme://com.account.appname")))
{
NSString urlString = new NSString(Session.DropboxAPIHost);
NSUrl myFileUrl = new NSUrl(urlString);
UIApplication.SharedApplication.OpenUrl(myFileUrl)
}

But nothing will happening. I am new to xamarin Please suggest a solution

Sanjeev S
  • 626
  • 1
  • 8
  • 27

1 Answers1

2

I think you can use url scheme to open dropbox. I tried it and it works ~

//dbapi-1 is Dropbox url scheme
NSUrl appurl = NSUrl.FromString("dbapi-1:");
UIApplication.SharedApplication.OpenUrl(appurl);

And maybe you can see this Does dropbox app on iOS has a URL scheme?

Community
  • 1
  • 1
Ann
  • 61
  • 5
  • 1
    `OpenUrl` is deprecated in iOS 10 http://useyourloaf.com/blog/openurl-deprecated-in-ios10/ – BytesGuy Jan 10 '17 at 09:47
  • 1
    Thanks. Like @BytesGuy said. OpenUrl is deprecated in iOS 10. So ,If you want to use new method to replace OpenUrl. you can see this: https://annhanmovienight.wordpress.com/2017/01/11/xamarin-ios-openurl-is-deprecated-in-ios-10/ – Ann Jan 11 '17 at 03:06