Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] [Mobile] Add Android and iOS mobile projects stubs #11849

Draft
wants to merge 86 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
568df57
Add Android and iOS mobile projects stubs
wieslawsoltes Oct 31, 2023
db1d56e
Add WalletWasabi project reference
wieslawsoltes Oct 31, 2023
d667142
Add WalletWasabi project reference
wieslawsoltes Oct 31, 2023
45f7ab0
Split usage of Microsoft.AspNetCore.Mvc.NewtonsoftJson package into m…
wieslawsoltes Oct 31, 2023
0835102
Now try referencing WalletWasabi.Fluent project for Android
wieslawsoltes Oct 31, 2023
8ecf0f6
Disable ValidateExecutableReferencesMatchSelfContained for iOS project
wieslawsoltes Oct 31, 2023
5b5b513
Do not set RuntimeIdentifiers for now to build mobile
wieslawsoltes Oct 31, 2023
3b1ae14
Trying to use net7.0-android for TargetFramework
wieslawsoltes Oct 31, 2023
9941882
Change OutputType to Library in WalletWasabi.Daemon for now to enable…
wieslawsoltes Oct 31, 2023
0d35164
Dummy App no longer needed on Android
wieslawsoltes Oct 31, 2023
058e6bb
Try using Shell for ISingleViewApplicationLifetime
wieslawsoltes Oct 31, 2023
09f8406
Disable DevTools on Android and iOS
wieslawsoltes Oct 31, 2023
c810f57
Hack app initialization to get running on Android
wieslawsoltes Oct 31, 2023
cbf0157
Add logging to logcat
wieslawsoltes Nov 1, 2023
fae840f
Update lock files for now
wieslawsoltes Nov 1, 2023
2c3cace
Update lock files
wieslawsoltes Nov 4, 2023
16025cb
Hack fix for iOS build failure
wieslawsoltes Nov 4, 2023
7bb21de
Remmove dummy App for iOS
wieslawsoltes Nov 4, 2023
f2496bf
Copy paste initialisation hacks from Android
wieslawsoltes Nov 4, 2023
77776d9
Update WalletWasabi.Fluent.iOS.csproj
wieslawsoltes Nov 4, 2023
ff3e72a
Merge branch 'master' into vdg/mobile
wieslawsoltes Nov 5, 2023
c55793e
Switch to iossimulator-arm64 RID for iOS for faster performance on ap…
wieslawsoltes Nov 5, 2023
3c49545
Hack fix for now
wieslawsoltes Nov 5, 2023
3b265be
Update native dependencies for iossimulator-arm64 RID
wieslawsoltes Nov 5, 2023
46a3ca5
Add single lifetime clipboard support
wieslawsoltes Nov 5, 2023
2a818ac
Add workaround for now to make it compile
wieslawsoltes Nov 5, 2023
78b3a15
Remove unneeded stuff
wieslawsoltes Nov 5, 2023
772e7cc
Organize package references
wieslawsoltes Nov 5, 2023
b151fd5
Update projects
wieslawsoltes Nov 5, 2023
86d334a
Update WalletWasabi.Fluent.csproj
wieslawsoltes Nov 5, 2023
37ab15f
Update WalletWasabi.Fluent.Android.csproj
wieslawsoltes Nov 5, 2023
3af051e
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 6, 2023
b1280af
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 6, 2023
6c79321
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 9, 2023
1b5f6bd
Update Directory.Packages.props
wieslawsoltes Nov 9, 2023
a98ba2a
Fix initialize
wieslawsoltes Nov 9, 2023
e345da9
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 13, 2023
661bad2
Add ios-arm64
wieslawsoltes Nov 13, 2023
469a581
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 16, 2023
67e5504
Merge branch 'master' into vdg/mobile
wieslawsoltes Nov 20, 2023
865195e
Refactor app lifetime initialization and handling
wieslawsoltes Nov 20, 2023
4e3bebd
Remove redundant call
wieslawsoltes Nov 20, 2023
deb1425
Add try/catch to main
wieslawsoltes Nov 20, 2023
4c2049b
Disable FontManagerOptions for iOS for now as it crashes the app
wieslawsoltes Nov 20, 2023
1eca89b
Restore private modifier
wieslawsoltes Nov 20, 2023
f2be2c7
Restore private setter
wieslawsoltes Nov 20, 2023
d234826
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Nov 21, 2023
b1146ea
Install workloads on ci
wieslawsoltes Nov 21, 2023
bc90ac9
Do not install ios workload on linux as its not supported
wieslawsoltes Nov 21, 2023
ec3f229
Remove iOS project from build process on Linux as its workload is not…
wieslawsoltes Nov 21, 2023
1defe86
Remove duplicate package version
wieslawsoltes Nov 21, 2023
a3d8d5d
Fix CF
wieslawsoltes Nov 21, 2023
540a3d4
Disable TorSettings initialization
wieslawsoltes Nov 21, 2023
ad2f0ab
Fix CF
wieslawsoltes Nov 21, 2023
0afd32b
Fix CF
wieslawsoltes Nov 21, 2023
7f35992
Add global flag to disable tor
wieslawsoltes Nov 21, 2023
18d2eef
Switch CodeQL workflow to macos-latest
wieslawsoltes Nov 21, 2023
2568a65
Install workloads for CodeQL workflow
wieslawsoltes Nov 21, 2023
cb2ea43
Update osx pipeline to macOS-13 to build iOS project
wieslawsoltes Nov 21, 2023
2bb19b7
Update osx pipeline to windows-2022 to build android project
wieslawsoltes Nov 21, 2023
86a2f4d
Install required Java SDK 11.0
wieslawsoltes Nov 21, 2023
adbf82b
Select Xcode version in CodeQL workflow
wieslawsoltes Nov 21, 2023
62e44d9
Skip test for now
wieslawsoltes Nov 21, 2023
0b05fe1
Update Directory.Packages.props
wieslawsoltes Nov 22, 2023
b8d69d7
Fix CF
wieslawsoltes Nov 22, 2023
d1f3835
Update Android and iOS entry programs and format code
wieslawsoltes Nov 22, 2023
9d4f6a4
Fix CF
wieslawsoltes Nov 22, 2023
9ae91cc
Remove unneeded project items and add comment
wieslawsoltes Nov 22, 2023
24a1e6b
Fix CF
wieslawsoltes Nov 22, 2023
c2c8db8
Enable RunAOTCompilation
wieslawsoltes Nov 22, 2023
0c76339
Quick hack to make running in Release mode
wieslawsoltes Nov 22, 2023
6428b4a
Set LaunchMode.SingleInstance and NoActionBar theme
wieslawsoltes Nov 22, 2023
22b527c
Update to Avalonia 11.0.6
wieslawsoltes Dec 6, 2023
59bfe66
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Jan 2, 2024
cf93729
Temporary workaround for WalletWasabi.Fluent.iOS/Android build
wieslawsoltes Jan 2, 2024
8ccc47f
Update TargetFramework for iOS and Android projects
wieslawsoltes Jan 2, 2024
95e5db0
Remove temporary workaround for WalletWasabi.Fluent.iOS/Android build
wieslawsoltes Jan 2, 2024
3630482
Override TargetFramework and RuntimeIdentifiers in the Directory.Buil…
wieslawsoltes Jan 2, 2024
97f6cc9
Move RuntimeIdentifier to Directory.Build.p… …rops
wieslawsoltes Jan 2, 2024
74b944c
Set RuntimeIdentifiers
wieslawsoltes Jan 2, 2024
e30d247
Set properties for mobile projects
wieslawsoltes Jan 2, 2024
f587c72
Update Directory.Build.props
wieslawsoltes Jan 2, 2024
d9e9d1b
Update Directory.Build.props
wieslawsoltes Jan 2, 2024
562abf0
Update Directory.Build.props
wieslawsoltes Jan 2, 2024
e6d2ce1
Use android-arm64
wieslawsoltes Jan 2, 2024
d738f7a
Merge remote-tracking branch 'upstream/master' into vdg/mobile
wieslawsoltes Jan 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: macos-13
permissions:
actions: read
contents: read
Expand All @@ -27,11 +27,17 @@ jobs:
with:
languages: ${{ matrix.language }}

- name: 'Select Xcode version'
run: sudo xcode-select -s /Applications/Xcode_14.3.app

- name: 'Install dotnet'
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: 'Install workloads'
run: dotnet workload install android ios

- name: 'Restore packages'
run: dotnet restore

Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
<!--<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>-->
<!--<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64;iossimulator-arm64;iossimulator-x64;android-x86;android-arm</RuntimeIdentifiers>-->
<AnalysisLevel>latest</AnalysisLevel>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<PackageVersion Include="DynamicData" Version="8.1.1" />
<!-- UI Mobile. -->
<PackageVersion Include="Avalonia.Android" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.3" />
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.ViewModel" Version="2.3.1.3" />
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.5" />
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.ViewModel" Version="2.6.2.2" />
<PackageVersion Include="Avalonia.iOS" Version="$(AvaloniaVersion)" />
<!-- UI Testing. -->
<PackageVersion Include="Avalonia.Headless.XUnit" Version="$(AvaloniaVersion)" />
Expand Down
17 changes: 12 additions & 5 deletions WalletWasabi.Daemon/Global.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.Extensions.Caching.Memory;

Check notice on line 1 in WalletWasabi.Daemon/Global.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (master)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.09 to 5.27, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
using NBitcoin;
using Nito.AsyncEx;
using System;
Expand Down Expand Up @@ -47,8 +47,9 @@
DataDir = dataDir;
ConfigFilePath = configFilePath;
Config = config;
TorSettings = new TorSettings(DataDir, distributionFolderPath: EnvironmentHelpers.GetFullBaseDirectory(), Config.TerminateTorOnExit, Environment.ProcessId);

TorSettings = IsTorEnabled
? new TorSettings(DataDir, distributionFolderPath: EnvironmentHelpers.GetFullBaseDirectory(), Config.TerminateTorOnExit, Environment.ProcessId)
: null;
HostedServices = new HostedServices();

var networkWorkFolderPath = Path.Combine(DataDir, "BitcoinStore", Network.ToString());
Expand Down Expand Up @@ -87,7 +88,7 @@
var p2p = new P2pNetwork(
Network,
Config.GetBitcoinP2pEndPoint(),
Config.UseTor ? TorSettings.SocksEndpoint : null,
Config.UseTor ? TorSettings?.SocksEndpoint : null,
Path.Combine(DataDir, "BitcoinP2pNetwork"),
BitcoinStore);
if (!Config.BlockOnlyMode)
Expand Down Expand Up @@ -126,8 +127,10 @@
/// <summary>Cancellation token to cancel <see cref="InitializeNoWalletAsync(TerminateService)"/> processing.</summary>
private CancellationTokenSource StoppingCts { get; } = new();

public static bool IsTorEnabled = true;

public string DataDir { get; }
public TorSettings TorSettings { get; }
public TorSettings? TorSettings { get; }
public BitcoinStore BitcoinStore { get; }

/// <summary>HTTP client factory for sending HTTP requests.</summary>
Expand Down Expand Up @@ -163,7 +166,7 @@

private WasabiHttpClientFactory BuildHttpClientFactory(Func<Uri> backendUriGetter) =>
new(
Config.UseTor ? TorSettings.SocksEndpoint : null,
Config.UseTor ? TorSettings?.SocksEndpoint : null,
backendUriGetter);

public async Task InitializeNoWalletAsync(TerminateService terminateService, CancellationToken cancellationToken)
Expand Down Expand Up @@ -278,6 +281,10 @@
{
using (BenchmarkLogger.Measure(operationName: "TorProcessManager.Start"))
{
if (TorSettings is null)
{
return;
}

Check warning on line 287 in WalletWasabi.Daemon/Global.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (master)

❌ New issue: Bumpy Road Ahead

StartTorProcessManagerAsync has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
TorManager = new TorProcessManager(TorSettings);
await TorManager.StartAsync(attempts: 3, cancellationToken).ConfigureAwait(false);
Logger.LogInfo($"{nameof(TorProcessManager)} is initialized.");
Expand Down
12 changes: 6 additions & 6 deletions WalletWasabi.Daemon/PersistentConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@ public record PersistentConfig : IConfigNg
[System.Text.Json.Serialization.JsonPropertyName("LocalBitcoinCoreDataDir")]
public string LocalBitcoinCoreDataDir { get; init; } = EnvironmentHelpers.GetDefaultBitcoinCoreDataDirOrEmptyString();

[JsonProperty(PropertyName = "MainNetBitcoinP2pEndPoint")]
// [JsonProperty(PropertyName = "MainNetBitcoinP2pEndPoint")]
[System.Text.Json.Serialization.JsonPropertyName("MainNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultMainNetBitcoinP2pPort)]
// [JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultMainNetBitcoinP2pPort)]
[System.Text.Json.Serialization.JsonConverter(typeof(MainNetBitcoinP2pEndPointConverterNg))]
public EndPoint MainNetBitcoinP2pEndPoint { get; init; } = new IPEndPoint(IPAddress.Loopback, Constants.DefaultMainNetBitcoinP2pPort);

[JsonProperty(PropertyName = "TestNetBitcoinP2pEndPoint")]
// [JsonProperty(PropertyName = "TestNetBitcoinP2pEndPoint")]
[System.Text.Json.Serialization.JsonPropertyName("TestNetBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultTestNetBitcoinP2pPort)]
// [JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultTestNetBitcoinP2pPort)]
[System.Text.Json.Serialization.JsonConverter(typeof(TestNetBitcoinP2pEndPointConverterNg))]
public EndPoint TestNetBitcoinP2pEndPoint { get; init; } = new IPEndPoint(IPAddress.Loopback, Constants.DefaultTestNetBitcoinP2pPort);

[JsonProperty(PropertyName = "RegTestBitcoinP2pEndPoint")]
// [JsonProperty(PropertyName = "RegTestBitcoinP2pEndPoint")]
[System.Text.Json.Serialization.JsonPropertyName("RegTestBitcoinP2pEndPoint")]
[JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultRegTestBitcoinP2pPort)]
// JsonConverter(typeof(EndPointJsonConverter), Constants.DefaultRegTestBitcoinP2pPort)]
[System.Text.Json.Serialization.JsonConverter(typeof(RegTestBitcoinP2pEndPointConverterNg))]
public EndPoint RegTestBitcoinP2pEndPoint { get; init; } = new IPEndPoint(IPAddress.Loopback, Constants.DefaultRegTestBitcoinP2pPort);

Expand Down
4 changes: 3 additions & 1 deletion WalletWasabi.Daemon/WalletWasabi.Daemon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<PathMap>$(MSBuildProjectDirectory)\=WalletWasabi.Daemon</PathMap>
<OutputType>Exe</OutputType>
<!-- TODO: For mobile projects (iOS/Android) we need OutputType=Library -->
<!--<OutputType>Exe</OutputType>-->
<OutputType>Library</OutputType>
</PropertyGroup>

<PropertyGroup>
Expand Down
23 changes: 23 additions & 0 deletions WalletWasabi.Daemon/WasabiAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,29 @@ public WasabiApplication(WasabiAppBuilder wasabiAppBuilder)
TerminateService = new(TerminateApplicationAsync, AppConfig.Terminate);
}

public void RunAsyncMobile(Action afterStarting)
{
if (AppConfig.MustCheckSingleInstance)
{
// TODO:
}

try
{
// TODO:
// TerminateService.Activate();

BeforeStarting();

afterStarting();
}
finally
{
// TODO:
// BeforeStopping();
}
}

public async Task<ExitCode> RunAsync(Func<Task> afterStarting)
{
if (AppConfig.Arguments.Contains("--version"))
Expand Down
25 changes: 25 additions & 0 deletions WalletWasabi.Fluent.Android/AppBuilderAndroidExtension.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Avalonia;
using Avalonia.Media;

namespace WalletWasabi.Fluent.Android;

public static class AppBuilderAndroidExtension
{
public static AppBuilder SetupAppBuilder(AppBuilder appBuilder)
{
bool enableGpu = Services.PersistentConfig is null ? false : Services.PersistentConfig.EnableGpu;

appBuilder.UseAndroid();

return appBuilder
.WithInterFont()
.With(new FontManagerOptions { DefaultFamilyName = "fonts:Inter#Inter, $Default" })
.With(new SkiaOptions { MaxGpuResourceSizeBytes = 2560 * 1600 * 4 * 12 })
.With(new AndroidPlatformOptions
{
RenderingMode = enableGpu
? new[] { AndroidRenderingMode.Egl, AndroidRenderingMode.Software }
: new[] { AndroidRenderingMode.Software },
});
}
}
7 changes: 7 additions & 0 deletions WalletWasabi.Fluent.Android/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<TargetFramework>net8.0-android</TargetFramework>
<!--<RuntimeIdentifiers>android-x86;android-arm</RuntimeIdentifiers>-->
<RuntimeIdentifier>android-arm64</RuntimeIdentifier>
</PropertyGroup>
</Project>
Binary file added WalletWasabi.Fluent.Android/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions WalletWasabi.Fluent.Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
using System;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Net.Sockets;
using Android.App;
using Android.Content.PM;
using Android.Util;
using Android.Views;
using Avalonia;
using Avalonia.Android;
using Avalonia.ReactiveUI;
using WalletWasabi.Daemon;
using WalletWasabi.Logging;

namespace WalletWasabi.Fluent.Android;

[Activity(
Label = "Wasabi Wallet",
Theme = "@style/MyTheme.NoActionBar",
Icon = "@drawable/icon",
MainLauncher = true,
LaunchMode = LaunchMode.SingleInstance,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode,
WindowSoftInputMode = SoftInput.AdjustResize)]
public class MainActivity : AvaloniaMainActivity<App>
{
private WasabiApplication? _app;

protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
// TODO: Crash reporting

Log.Error("WASABI", "CustomizeAppBuilder");

try
{
Global.IsTorEnabled = false;

// TODO: Do we need on Android EnsureSingleInstance with true?
_app = WasabiAppBuilder
.Create("Wasabi GUI", System.Array.Empty<string>())
.EnsureSingleInstance(false)
.OnUnhandledExceptions(LogUnhandledException)
.OnUnobservedTaskExceptions(LogUnobservedTaskException)
.OnTermination(TerminateApplication)
.Build();

// TODO: WasabiAppExtensions.RunAsDesktopGuiAsync
_app.RunAsyncMobile(afterStarting:
() => App.AfterStarting(_app, AppBuilderAndroidExtension.SetupAppBuilder, builder));
}
catch (Exception ex)
{
// TODO:
// CrashReporter.Invoke(ex);

Logger.LogCritical(ex);

Log.Error("WASABI", $"{ex}");
}

return base.CustomizeAppBuilder(builder);
}

/// <summary>
/// Do not call this method it should only be called by TerminateService.
/// </summary>
private static void TerminateApplication()
{
// TODO:
// Dispatcher.UIThread.Post(() => (Application.Current?.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)?.MainWindow?.Close());
}

private static void LogUnobservedTaskException(object? sender, AggregateException e)
{
ReadOnlyCollection<Exception> innerExceptions = e.Flatten().InnerExceptions;

switch (innerExceptions)
{
case [SocketException { SocketErrorCode: SocketError.OperationAborted }]:
// Source of this exception is NBitcoin library.
case [OperationCanceledException { Message: "The peer has been disconnected" }]:
// Until https://github.com/MetacoSA/NBitcoin/pull/1089 is resolved.
Logger.LogTrace(e);
break;

default:
Logger.LogDebug(e);
break;
}
}

private static void LogUnhandledException(object? sender, Exception e) =>
Logger.LogWarning(e);

[SuppressMessage("CodeQuality", "IDE0051:Remove unused private members",
Justification = "Required to bootstrap Avalonia's Visual Previewer")]
private static AppBuilder BuildAvaloniaApp()
{
return AppBuilderAndroidExtension.SetupAppBuilder(AppBuilder.Configure(() => new App()).UseReactiveUI());
}
}
15 changes: 15 additions & 0 deletions WalletWasabi.Fluent.Android/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="Wasabi Wallet" android:icon="@drawable/Icon" />
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
</queries>
</manifest>
13 changes: 13 additions & 0 deletions WalletWasabi.Fluent.Android/Resources/drawable/splash_screen.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item>
<color android:color="@color/splash_background"/>
</item>

<item android:drawable="@drawable/icon"
android:width="120dp"
android:height="120dp"
android:gravity="center" />

</layer-list>
4 changes: 4 additions & 0 deletions WalletWasabi.Fluent.Android/Resources/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_background">#212121</color>
</resources>
4 changes: 4 additions & 0 deletions WalletWasabi.Fluent.Android/Resources/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_background">#FFFFFF</color>
</resources>
21 changes: 21 additions & 0 deletions WalletWasabi.Fluent.Android/Resources/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>

<style name="MyTheme">
</style>

<style name="MyTheme.NoActionBar" parent="@style/Theme.AppCompat.DayNight.NoActionBar">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>

<style name="MyTheme.Splash" parent ="MyTheme.NoActionBar">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowContentOverlay">@null</item>
</style>

<style name="MyTheme.Main" parent ="MyTheme.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
</style>

</resources>
Loading
Loading