Forum Xamarin.Android

[Xamarin Blog] Add Some Storage to Your Apps

MayurTendulkarMayurTendulkar USXamarin Team Xamurai
edited March 2015 in Xamarin.Android

I've just posted a blog 'Add Some Storage to Your Apps' which talks about integrating Office 365 component: OneDrive for Business in Xamarin mobile apps. Use this thread to discuss the topic, post questions or share your feedback.

Mayur Tendulkar


  • CheesebaronCheesebaron DKInsider, University mod


  • DavidDancyDavidDancy AUMember ✭✭✭✭

    This looks very nice. Will you be updating the post with iOS as well?

  • MayurTendulkarMayurTendulkar USXamarin Team Xamurai

    The sample should work for iOS with just one change. And that has to be during authentication flow. Authentication flow differs on platforms, rest of the stuff is same; as it is just calling the REST APIs internally.
    You may want to give it a try. The change should be in GetAccessToken method, where Context is not required. So, you can just pass new AuthorizationParameters().
    Do let me know if you face any challenges and I'll try it myself.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @MayurTendulkar Thanks! I will give it a try.

  • JrgAckermannJrgAckermann DEMember, University

    Is there any working example for iOS? I've spent hours now... But even the NuGet Libraries fail to install in my iOS Project in Xamarin Studio...

  • CheesebaronCheesebaron DKInsider, University mod

    @JrgAckermann Is your project a Unified API project? What error message do you get?

  • JorgeSanzJorgeSanz USMember

    Sample isn't working. After authenticate I get following exception:
    Any tips to resolve this? Thanks

    Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException at --- End of managed exception stack trace --- at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at at at at dalvik.system.NativeStart.main(Native Method) at Caused by: java.lang.reflect.InvocationTargetException at at java.lang.reflect.Method.invokeNative(Native Method) at at java.lang.reflect.Method.invoke( at at$ at ... 2 more at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: Microsoft.Office365.Discovery.DiscoveryFailedException: Exception of type 'Microsoft.Office365.Discovery.DiscoveryFailedException' was thrown. at at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x0004b> at at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (object) <IL 0x00006, 0x0003b> at Android.App.SyncContext/<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18 at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36 at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00009] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Java.Lang.IRunnable.cs:71 at at (wrapper dynamic-method) object.53a635e4-c3ae-4264-99f1-cc204228b19f (intptr,intptr) <IL 0x00011, 0x00027> at at Method) at at at at android.os.Handler.handleCallback( at at android.os.Handler.dispatchMessage( at at android.os.Looper.loop( at at at ... 5 more

  • BrunoPasquini.7813BrunoPasquini.7813 AGMember ✭✭

    HI, the github link for downloading the code is not working ( Is this code available to download somewhere else?
    Regards, Bruno.

  • MayurTendulkarMayurTendulkar USXamarin Team Xamurai

    With Graph API covering OneDrive, it makes sense to use those APIs to access files. I've written couple of blog posts about Graph API get started. The sample for the same has been updated to use latest APIs and you can find it here.
    And you can find the documentation for Graph API - Files here.

    Let me know if that works, else I'll create a sample for you.

  • ManoNagarajanManoNagarajan USMember ✭✭
    edited February 2019

    @MayurTendulkar The GitHub link is not availble. The sample could be very useful for biginner.

  • MayurTendulkarMayurTendulkar USXamarin Team Xamurai

    I've removed the sample, as a lot of APIs has been changed since I wrote this blog post. You can follow the guide/documentation from here for latest API specs:

Sign In or Register to comment.