mirror of
https://github.com/bitwarden/mobile
synced 2025-12-14 15:23:35 +00:00
hockeyapp custom listener for android. Disable some hockeyapp features in ios since we use google analytics.
This commit is contained in:
39
src/Android/HockeyAppCrashManagerListener.cs
Normal file
39
src/Android/HockeyAppCrashManagerListener.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using HockeyApp.Android;
|
||||
using Bit.App.Abstractions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Bit.Android
|
||||
{
|
||||
public class HockeyAppCrashManagerListener : CrashManagerListener
|
||||
{
|
||||
private readonly IAppIdService _appIdService;
|
||||
private readonly IAuthService _authService;
|
||||
|
||||
public HockeyAppCrashManagerListener(
|
||||
IAppIdService appIdService,
|
||||
IAuthService authService)
|
||||
{
|
||||
_appIdService = appIdService;
|
||||
_authService = authService;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
var log = new
|
||||
{
|
||||
AppId = _appIdService.AppId,
|
||||
UserId = _authService.UserId
|
||||
};
|
||||
|
||||
return JsonConvert.SerializeObject(log, Formatting.Indented);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ShouldAutoUploadCrashes()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user