Skip to content

Commit 02d2da7

Browse files
authored
Merge pull request #15 from aleksander-haugas/VaultScala
Vault scala
2 parents 61eaa04 + 390c476 commit 02d2da7

File tree

143 files changed

+4230
-3954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+4230
-3954
lines changed

app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cmake_minimum_required(VERSION 3.4.1)
22
message(STATUS ABI_INFO = ${ANDROID_ABI})
33

4+
45
add_library( monerujo
56
SHARED
67
src/main/cpp/monerujo.cpp )

app/build.gradle

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ android {
55
applicationId "io.scalaproject.vault"
66
buildToolsVersion = '34.0.0'
77
compileSdk 34
8-
minSdkVersion 21
9-
targetSdkVersion 34
10-
versionCode 16
11-
versionName "1.1.5"
8+
minSdk 23
9+
//noinspection OldTargetApi
10+
targetSdk 34
11+
versionCode 17
12+
versionName "1.2.0"
1213

1314
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1415
externalNativeBuild {
@@ -20,9 +21,11 @@ android {
2021

2122
ndk {
2223
//noinspection ChromeOsAbiSupport
23-
abiFilters 'arm64-v8a', 'x86_64', 'armeabi-v7a'
24+
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
2425
}
2526
resourceConfigurations += ['en', 'fr', 'de', 'el', 'eo', 'es', 'et', 'hu', 'it', 'ja', 'nb', 'nl', 'pt', 'pt-rBR', 'ro', 'ru', 'sk', 'sr', 'sv', 'uk', 'zh-rCN', 'zh-rTW']
27+
signingConfig signingConfigs.debug
28+
proguardFiles 'proguard-rules.pro'
2629
}
2730

2831
flavorDimensions 'type', 'net'
@@ -89,6 +92,16 @@ android {
8992
// Enumerate translated locales
9093
def availableLocales = ["en"]
9194
namespace 'io.scalaproject.vault'
95+
compileOptions {
96+
sourceCompatibility JavaVersion.VERSION_17
97+
targetCompatibility JavaVersion.VERSION_17
98+
}
99+
dependenciesInfo {
100+
includeInApk false
101+
includeInBundle false
102+
}
103+
compileSdk 34
104+
ndkVersion '25.1.8937393'
92105
new File("app/src/main/res/").eachFileMatch(~/^values-.*/) { file ->
93106
def languageTag = file.name.substring(7).replace("-r", "-")
94107
availableLocales.add(languageTag)
@@ -115,23 +128,32 @@ android {
115128
}
116129
}
117130

118-
dependencies {
131+
tasks.withType(JavaCompile).configureEach {
132+
options.compilerArgs << "--enable-preview"
133+
}
134+
135+
java {
136+
toolchain {
137+
languageVersion.set(JavaLanguageVersion.of(17))
138+
}
139+
}
119140

120-
implementation 'com.google.android.material:material:1.11.0' // keep version 1.0.0 as it fixes a bug with Material Button
141+
dependencies {
142+
implementation 'com.google.android.material:material:1.12.0' // keep version 1.0.0 as it fixes a bug with Material Button
121143
implementation "com.android.support:support-v4"
122144
implementation "com.android.support:recyclerview-v7"
123145
implementation 'androidx.cardview:cardview:1.0.0'
124146
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
125147

126-
implementation 'com.google.android.material:material:1.11.0' // keep version 1.1.0 as it fixes a bug with Material Button
127-
implementation 'androidx.appcompat:appcompat:1.6.1' // keep version 1.1.0 as it fixes a bug with Material Button
148+
implementation 'com.google.android.material:material:1.12.0' // keep version 1.1.0 as it fixes a bug with Material Button
149+
implementation 'androidx.appcompat:appcompat:1.7.0' // keep version 1.1.0 as it fixes a bug with Material Button
128150
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
129151

130152
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
131153

132154
//noinspection GradleDependency
133155
implementation 'com.squareup.okhttp3:okhttp:3.0.1' // keep version 3.0.1 to avoid errors
134-
implementation "com.burgstaller:okhttp-digest:1.18"
156+
implementation 'io.github.rburgst:okhttp-digest:3.1.1'
135157
implementation "com.jakewharton.timber:timber:5.0.1"
136158

137159
implementation 'com.nulab-inc:zxcvbn:1.5.2'
@@ -143,6 +165,7 @@ dependencies {
143165

144166
implementation 'com.github.yalantis:ucrop:2.2.8'
145167

168+
146169
testImplementation "junit:junit:4.13.2"
147170
testImplementation "org.mockito:mockito-all:$rootProject.ext.mockitoVersion"
148171
testImplementation "com.squareup.okhttp3:mockwebserver:4.9.3"
@@ -154,4 +177,15 @@ dependencies {
154177
implementation "ch.acra:acra-mail:$acraVersion"
155178

156179
implementation 'com.unstoppabledomains:resolution:3.0.0'
180+
// implementation 'com.yubico.yubikit:core:(insert version here)' for Multi factor auth --> extra security layer
181+
182+
// This is for the game or multiuser realtime interaction branch ... Title ???
183+
// ===============================================================
184+
// implementation 'com.github.heroiclabs.nakama-java:nakama-java:<commit>'
185+
// implementation 'com.github.heroiclabs.nakama-java:satori-java:<commit>'
186+
187+
188+
// or, depend on the fat Jar which bundles all of the Nakama Java dependencies into a single Jar.
189+
// implementation 'com.github.heroiclabs.nakama-java:nakama-java-all:<commit>'
190+
// implementation 'com.github.heroiclabs.nakama-java:satori-java-all:<commit>'
157191
}

app/src/main/AndroidManifest.xml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
4-
5-
<uses-feature
6-
android:name="android.hardware.camera"
7-
android:required="false" />
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:installLocation="internalOnly">
3+
<uses-feature android:name="android.hardware.camera" android:required="false" />
84

5+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
96
<uses-permission android:name="android.permission.INTERNET" />
10-
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
7+
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
118
<uses-permission android:name="android.permission.WAKE_LOCK" />
129
<uses-permission android:name="android.permission.CAMERA" />
1310
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
11+
<uses-permission android:name="android.permission.NFC" />
1412
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
15-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
13+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:ignore="SelectedPhotoAccess" />
14+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
15+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
16+
17+
<!-- Compatibility across different Android versions -->
18+
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="34" tools:ignore="GradleOverrides" />
19+
20+
<!-- Permissions for USB (Hardware Wallets -> New Implementation)-->
21+
<uses-feature android:name="android.hardware.usb.host" />
22+
<uses-feature android:name="android.hardware.usb.accessory" android:required="false" />
1623

1724
<application
1825
android:name=".ScalaVaultApplication"
19-
android:allowBackup="false"
26+
android:allowBackup="true"
2027
android:icon="@mipmap/ic_launcher"
2128
android:roundIcon="@mipmap/ic_launcher_round"
2229
android:label="@string/app_name"
2330
android:supportsRtl="true"
2431
android:theme="@style/AppTheme"
2532
android:usesCleartextTraffic="true"
2633
android:requestLegacyExternalStorage="true"
27-
tools:targetApi="s"
34+
tools:targetApi="tiramisu"
2835
android:dataExtractionRules="@xml/data_extraction_rules"
29-
tools:ignore="DataExtractionRules">
36+
tools:ignore="DataExtractionRules"
37+
android:localeConfig="@xml/locales_config"
38+
android:enableOnBackInvokedCallback="true">
3039

3140
<activity
3241
android:name="com.yalantis.ucrop.UCropActivity"
@@ -49,6 +58,10 @@
4958
android:launchMode="singleTask"
5059
android:screenOrientation="behind" />
5160

61+
<activity
62+
android:name=".NetworkActivity"
63+
android:exported="false" />
64+
5265
<activity
5366
android:name=".WalletActivity"
5467
android:configChanges="orientation|keyboardHidden"
@@ -98,7 +111,8 @@
98111
android:name=".service.WalletService"
99112
android:description="@string/service_description"
100113
android:exported="false"
101-
android:label="Scala Wallet Service" />
114+
android:label="Scala Wallet Service"
115+
android:foregroundServiceType="dataSync" />
102116

103117
<provider
104118
android:name="androidx.core.content.FileProvider"
@@ -109,5 +123,18 @@
109123
android:name="android.support.FILE_PROVIDER_PATHS"
110124
android:resource="@xml/filepaths" />
111125
</provider>
126+
127+
<service
128+
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
129+
android:enabled="false"
130+
android:exported="false">
131+
<meta-data
132+
android:name="autoStoreLocales"
133+
android:value="true" />
134+
</service>
135+
136+
<!-- Configuración USB (Web USB/HID - https://developers.ledger.com/)-->
137+
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/usb_device_filter" />
138+
112139
</application>
113140
</manifest>

0 commit comments

Comments
 (0)