Native Android exceptions on Xamarin

tom

Posted on
Apr 27 2015

Hi there, We are developing an Android app on Xamarin. The .NET exceptions are caught and reported by Raygun, but not the native Java ones. We have it setup like this:

Mindscape.Raygun4Net.RaygunClient.Attach("...");

Is it possible to mix the .NET client and the native android one? Or is there a way to catch the Java exceptions and report them through the .NET client?


Jason Fauchelle

Raygun

Posted on
Apr 28 2015

Hi Tom,

The Xamarin.Android provider does not currently support native exception reporting. We do have plans to add this in a future version. For now, I believe the only option is to create a native android binding to use our native Android provider in your Xamarin .NET app. I have added you to my list of contacts to notify you when this capability is built in to the Raygun4Net.Xamarin.Android provider.

-Jason Fauchelle


tom

Posted on
Apr 28 2015

Thanks Jason. Let's say we used the native Android Raygun using Xamarin Java bindings. Would this collide with the .NET client, or can both coexist in the same Xamarin app?


Jason Fauchelle

Raygun

Posted on
Apr 29 2015

Hi tom,

They should both be able to coexist in the same application, I know that one of our other customers has done this and got it working. They did it by writing a native java exception handler, and using the android provider in there to send the exceptions. If absolutely necessary, you could use your own modified version of the Android provider: https://github.com/MindscapeHQ/raygun4android or let me know if you have any questions.

-Jason Fauchelle


andyystephens

Posted on
Dec 09 2017

Hi is this issue resolved?


Jason Fauchelle

Raygun

Posted on
Dec 11 2017

Hi Andy,

No sorry, binding the native Android provider into the managed Xamarin.Android provider is not currently scheduled for the near term. These providers are open source though, so you could have a go at binding them together and submitting a PR if you wanted to.

https://github.com/MindscapeHQ/raygun4net

https://github.com/MindscapeHQ/raygun4android

-Jason Fauchelle


Reply