mirror of
https://github.com/bitwarden/mobile
synced 2026-01-06 10:34:07 +00:00
fdroid builds without Google and Hockey services
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<Configurations>Debug;Release;FDroid</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='FDroid|netstandard2.0|AnyCPU'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'FDroid|AnyCPU'">
|
||||
<DefineConstants>TRACE;FDROID;NETSTANDARD2_0</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HockeySDK.Xamarin" Version="5.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="PCLCrypto" Version="2.0.147" />
|
||||
<PackageReference Include="Plugin.Fingerprint" Version="1.4.6-beta4" />
|
||||
@@ -36,6 +35,10 @@
|
||||
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.1.47" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)|$(Platform)' != 'FDroid|AnyCPU'">
|
||||
<PackageReference Include="HockeySDK.Xamarin" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\AppResources.cs.Designer.cs">
|
||||
<DependentUpon>AppResources.cs.resx</DependentUpon>
|
||||
|
||||
@@ -112,7 +112,9 @@ namespace Bit.App.Pages
|
||||
{
|
||||
websiteIconsTable, WebsiteIconsLabel,
|
||||
totpTable, CopyTotpLabel,
|
||||
#if !FDROID
|
||||
analyticsTable, AnalyticsLabel
|
||||
#endif
|
||||
},
|
||||
Spacing = 0
|
||||
};
|
||||
|
||||
36
src/App/Services/NoopGoogleAnalyticsService.cs
Normal file
36
src/App/Services/NoopGoogleAnalyticsService.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.Android.Services
|
||||
{
|
||||
public class NoopGoogleAnalyticsService : IGoogleAnalyticsService
|
||||
{
|
||||
public void TrackAppEvent(string eventName, string label = null)
|
||||
{
|
||||
}
|
||||
|
||||
public void TrackExtensionEvent(string eventName, string label = null)
|
||||
{
|
||||
}
|
||||
|
||||
public void TrackEvent(string category, string eventName, string label = null)
|
||||
{
|
||||
}
|
||||
|
||||
public void TrackException(string message, bool fatal)
|
||||
{
|
||||
}
|
||||
|
||||
public void TrackPage(string pageName)
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispatch(Action completionHandler = null)
|
||||
{
|
||||
}
|
||||
|
||||
public void SetAppOptOut(bool optOut)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
29
src/App/Services/NoopPushNotificationListener.cs
Normal file
29
src/App/Services/NoopPushNotificationListener.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.App.Services
|
||||
{
|
||||
public class NoopPushNotificationListener : IPushNotificationListener
|
||||
{
|
||||
public void OnMessage(JObject value, string deviceType)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnRegistered(string token, string deviceType)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnUnregistered(string deviceType)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnError(string message, string deviceType)
|
||||
{
|
||||
}
|
||||
|
||||
public bool ShouldShowNotification()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
src/App/Services/NoopPushNotificationService.cs
Normal file
17
src/App/Services/NoopPushNotificationService.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Bit.App.Abstractions;
|
||||
|
||||
namespace Bit.App.Services
|
||||
{
|
||||
public class NoopPushNotificationService : IPushNotificationService
|
||||
{
|
||||
public string Token => null;
|
||||
|
||||
public void Register()
|
||||
{
|
||||
}
|
||||
|
||||
public void Unregister()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
#if !FDROID
|
||||
using System.Diagnostics;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -195,3 +196,4 @@ namespace Bit.App.Services
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user