I want to use Sentry with my Xamarin app. The docs say to initialize the SDK like so:
using (SentrySdk.Init("https://<key>@sentry.io/<project>"))
{
// App code
}
On Xamarin.iOS, I’d just put that in my Main.cs file and call UIApplication.Main inside where it says “App Code”. But on Xamarin.Android I’m not sure where I’d put it since there doesn’t appear to be a main entry point that surrounds the lifespan of everything else like there is on iOS. With Android, there’s a main activity, but it’ll get disposed of once my application launches the next activity. So I guess the question is, what’s the best way to init the SDK and then properly dispose of it when it needs doing so?