Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Accessing SharePoint Online

$
0
0

I'm really stuck trying to connect an Android app to Office 365.

Has anyone been successful to do this in a Xamarin app?
There is not many samples or documentation out there and would really appreciate any help.

I'm in first step of authentication, using this sample:
http://blog.xamarin.com/add-storage-to-your-apps-with-office-365/

I got this exception

Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException at --- End of managed exception stack trace --- at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 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(Method.java:515) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 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 mono.java.lang.RunnableImplementor.n_run(Native Method) at at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29) at at android.os.Handler.handleCallback(Handler.java:733) at at android.os.Handler.dispatchMessage(Handler.java:95) at at android.os.Looper.loop(Looper.java:136) at at android.app.ActivityThread.main(ActivityThread.java:5017) at ... 5 more

After that I have updated MainActivity to inherit from Activity and after the authentication I got a web view telling me that the website with the url of my Active Directory in Azure is not available. When the app is closed I got this exception.

Java.Lang.RuntimeException: java.lang.reflect.InvocationTargetException at --- End of managed exception stack trace --- at java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 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(Method.java:515) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at ... 2 more at Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object at OneDriveIntegrationSample.MainActivity.OnCreate (Android.OS.Bundle) [0x00015] in c:\Users\jorge.riberia\Desktop\O365ClientV2-master\OneDriveIntegrationSample\MainActivity.cs:37 at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d23da369/source/monodroid/src/Mono.Android/platforms/android-19/src/generated/Android.App.Activity.cs:2475 at at (wrapper dynamic-method) object.ef571741-4aae-43aa-a83a-300a943e9da1 (intptr,intptr,intptr) <IL 0x00017, 0x0002b> at at md5660544361ce26a28c7fa23eec85388e3.MainActivity.n_onCreate(Native Method) at at md5660544361ce26a28c7fa23eec85388e3.MainActivity.onCreate(MainActivity.java:28) at at android.app.Activity.performCreate(Activity.java:5231) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) at at android.app.ActivityThread.access$800(ActivityThread.java:135) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:136) at at android.app.ActivityThread.main(ActivityThread.java:5017) at ... 5 more


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>