Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
a746d3d
Merge pull request #53 from gruntsoftware/release/v4.4.1
kcw-grunt Mar 30, 2025
ba8ea45
Revert "Updated the APIManager"
kcw-grunt Mar 31, 2025
638ce3a
Reverted the Kotlin APIManager.
kcw-grunt Mar 31, 2025
5344a96
Add version and code to welcome screen
kcw-grunt Mar 31, 2025
ebc3bb9
reset padding
kcw-grunt Mar 31, 2025
03c68b8
Merge pull request #56 from gruntsoftware/feature/add-version-issue-108
kcw-grunt Apr 1, 2025
c770f01
Revert "Updated the APIManager"
kcw-grunt Mar 31, 2025
f8c1bd5
Reverted the Kotlin APIManager.
kcw-grunt Mar 31, 2025
ff58b57
fix: fix crash when FragmentSignal dismissed
andhikayuana Apr 4, 2025
d64ea93
fix: fix sync after wipe
andhikayuana Apr 7, 2025
277f387
Merge branch 'hotfix/api-manager-fix' of https://github.com/brainwall…
kcw-grunt Apr 7, 2025
9a8a20f
fix: fix wrong lifecycle to trigger callback at FragmentSignal
andhikayuana Apr 7, 2025
832fa36
Update issue templates
kcw-grunt Apr 8, 2025
b294cd6
updated core changes
kcw-grunt Apr 8, 2025
4ed8af3
Merge pull request #57 from gruntsoftware/hotfix/api-manager-fix
kcw-grunt Apr 8, 2025
089995a
Rename .java to .kt
andhikayuana Apr 11, 2025
7e85987
chore: refactor BRApiManager & APIClient
andhikayuana Apr 11, 2025
0aa41e7
chore: remove unused part at APIClient
andhikayuana Apr 14, 2025
0cc29cb
feat: wip new peer discovery
andhikayuana Apr 14, 2025
54d2d9e
feat: implement selected peer ip address from cache (fetched from API)
andhikayuana Apr 14, 2025
c6923b1
feat: implement selected peer ip address from cache (fetched from API)
andhikayuana Apr 14, 2025
ef4e6d2
feat: filter out peers with NODE_NETWORK, NODE_BLOOM
andhikayuana Apr 15, 2025
2336939
fix: race condition when clear shared prefs values after wipeAll
andhikayuana Apr 16, 2025
51a4d9a
Merge pull request #62 from gruntsoftware/hotfix/prefs-race-condition
kcw-grunt Apr 16, 2025
62afb9d
Merge pull request #61 from gruntsoftware/feat/new-peer-discovery
kcw-grunt Apr 16, 2025
391e319
Updating the core library
kcw-grunt Apr 16, 2025
836b6f0
Chore/revert pre peer discovery (Android) (#69)
andhikayuana Apr 25, 2025
3caa1a7
feat: remove unused activity (ImportActivity) at AndroidManifest.xml …
andhikayuana Apr 29, 2025
a324444
fix: fix crash IllegalStateException: cannot make a new request becau…
andhikayuana May 2, 2025
1f9c5d0
code bump
kcw-grunt May 2, 2025
7ca17d3
Feat/move tx fee (#74)
andhikayuana May 5, 2025
e7fb2b7
fix: fix dismiss allow state loss (#76)
andhikayuana May 7, 2025
3d8ef98
fix: fix typo at strings.xml (#75)
andhikayuana May 7, 2025
25be1a8
feat: new UI for receive and topup flow (moonpay integration) (#72)
andhikayuana May 12, 2025
18eda46
version and code bump
kcw-grunt May 12, 2025
dbb6a5f
Added support url (#81)
kcw-grunt May 19, 2025
c82a5e3
version and code bump
kcw-grunt May 19, 2025
2981ec6
Revert from eda0f532 & cherry pick (#86)
andhikayuana May 25, 2025
c161fed
build bump
kcw-grunt May 25, 2025
63d7494
chore: open bread activity first then open moonpay widget (#88)
andhikayuana May 26, 2025
f09eb28
Adjustment for circleci (#89)
andhikayuana May 29, 2025
47c69cd
fix: android: Footer version label is obfuscated (#92)
andhikayuana May 29, 2025
a9c4a63
fix: You saved it right screen reset button covers words (#93)
andhikayuana May 29, 2025
d8f08ad
tiny resizing (#94)
kcw-grunt May 29, 2025
ef93585
code and version bump
kcw-grunt May 29, 2025
174d612
change break (#97)
kcw-grunt May 30, 2025
a4521d7
build code number
andhikayuana May 31, 2025
6fec1e2
fix: [#137] fix: Reset fiat options in Buy / Receive modal (#99)
andhikayuana Jun 2, 2025
c8fdf8d
Chore/update device data (#100)
kcw-grunt Jun 2, 2025
3f646df
Add agent string obfuscation (#103)
kcw-grunt Jun 14, 2025
642f9e6
updated metadata (#105)
kcw-grunt Jun 24, 2025
50f44de
chore: remove screen lock detection (#106)
andhikayuana Jun 24, 2025
ea15423
🧰 Fx/seed words UI polish (#108)
kcw-grunt Jun 25, 2025
5b6dff3
❇️ Feat/add polish punjabi farsi (#109)
kcw-grunt Jun 27, 2025
4ff50b8
fix: fix YourSeedProveItState.isWordUsedCorrectly (#111)
andhikayuana Jun 29, 2025
2fd094f
Upgrade targetSdk 36 (#113)
andhikayuana Aug 5, 2025
4efd95f
feat(#195): adopt koin annotation for dependency injection (#120)
JosephSanjaya Aug 18, 2025
5900ed4
Create PULL_REQUEST_TEMPLATE.md
kcw-grunt Aug 19, 2025
3b1f628
bump for test (#121)
kcw-grunt Aug 19, 2025
f11d5a8
feat(#174): initiate games module (#119)
JosephSanjaya Aug 20, 2025
77ed7df
Force pushed the version and code bump and catch up with Prod.
kcw-grunt Aug 20, 2025
ef353e3
πŸš€[Release v4.7.2] Merge into Develop (#127)
kcw-grunt Aug 25, 2025
e25e9e1
Fix(#227): Crash when launching MoonPay Widget (#126)
JosephSanjaya Aug 25, 2025
e0aebb5
feat(#138): Improve Unlock Screen UI and add dark mode toggle (#122)
JosephSanjaya Aug 25, 2025
7d8dd14
Redesign welcome screen (#123)
josikie Aug 25, 2025
18df293
fix(#226): android test failure on RecoverWalletScreenGrabsTest (#130)
JosephSanjaya Aug 26, 2025
9b191b7
fix(#223): fix issue on test environment SLF4J + agent warnings in te…
JosephSanjaya Aug 26, 2025
c9b1ef0
feat(#225): Send sync duration in Firebase Analytics as a custom even…
JosephSanjaya Aug 30, 2025
58f0cd8
feat(#234): Implement language-specific Firebase messaging topics (#132)
JosephSanjaya Aug 30, 2025
4bb06cf
bump code
kcw-grunt Aug 30, 2025
9f4908b
chore(#234): normalize Indonesian language code to "id" (#133)
JosephSanjaya Aug 30, 2025
4a27ae0
Feat: Detekt and Test Plugins, (Including Create Detekt Baseline) (#136)
JosephSanjaya Sep 22, 2025
3285d8e
Chore/renamed gp module (#140)
kcw-grunt Sep 29, 2025
94459d0
create private gp submodule
kcw-grunt Sep 23, 2025
13c39a0
Update settings.gradle.kts
kcw-grunt Sep 23, 2025
c0683ad
chore: Migrate build logic to version catalog and update submodules
JosephSanjaya Sep 24, 2025
2fcb1b2
feat(deps): add kotlin-immutable dependency
JosephSanjaya Oct 5, 2025
631b4f6
refactor(app): Relocate core module imports
JosephSanjaya Oct 8, 2025
0b46614
Merge pull request #141 from gruntsoftware/js/feat/iap
JosephSanjaya Oct 9, 2025
279fa23
build bump
kcw-grunt Oct 9, 2025
5ea5fe9
Merge branch 'main' into release/v4.8.0
kcw-grunt Oct 9, 2025
779f47f
removed cruft
kcw-grunt Oct 9, 2025
05813ad
chore(submodules): remove bugged games repository
JosephSanjaya Oct 10, 2025
67000e9
bump code
kcw-grunt Oct 10, 2025
83f1b85
Release/v4.8.0 (#147)
kcw-grunt Oct 13, 2025
798b7c9
Merge branch 'develop' of https://github.com/brainwallet-co/android i…
kcw-grunt Oct 18, 2025
d5b14db
bug(crashlytics): Remove InputWordsActivity from AndroidManifest
JosephSanjaya Oct 18, 2025
a08c6f6
fix(crashlytics): resolve ReEnterPinActivity crashes and deprecation …
JosephSanjaya Oct 22, 2025
56be50f
Remove resizability and orientation restrictions in our app (#146)
josikie Oct 22, 2025
2f06f5c
build: Build secp256k1 as a static library and add ABI splits (#149)
JosephSanjaya Nov 14, 2025
aeb5ab5
version bump (#159)
kcw-grunt Feb 7, 2026
8cabf2a
Revert "build: Build secp256k1 as a static library and add ABI splits…
kcw-grunt Feb 7, 2026
0a46627
Techdebt/adjust build logic (#161)
kcw-grunt Feb 8, 2026
5738254
Added auto translate (#178)
kcw-grunt Apr 9, 2026
25fcc5d
Add auto-translate workflow for strings.xml
kcw-grunt Apr 12, 2026
34e6d65
Create PR summary workflow with GitHub Copilot
kcw-grunt Apr 12, 2026
914bcd3
Changed the AI completions
kcw-grunt Apr 13, 2026
ca4fcd9
Add more information of the README
kcw-grunt Apr 13, 2026
12a3d83
nit fix
kcw-grunt Apr 13, 2026
5d3a6c2
πŸ¦–πŸ˜± HUGE!! Bento Integration (#192)
kcw-grunt Apr 14, 2026
010be8c
Release/v4.9.0 (#201)
kcw-grunt Apr 16, 2026
ce9d121
Feat/add thai dutch (#197)
kcw-grunt Apr 16, 2026
083027f
update gitignore (#204)
kcw-grunt Apr 17, 2026
9495b47
Add send/receive transaction integration tests (#203)
kcw-grunt Apr 18, 2026
e0b116a
Designdebt/polish main screen (#205)
kcw-grunt Apr 18, 2026
902f8fb
Feat/add gamehub minigame (#206)
kcw-grunt Apr 19, 2026
879ab6f
Moved clipboard test point into event (#207)
kcw-grunt Apr 20, 2026
334ce3b
moved out of the state update (#208)
kcw-grunt Apr 20, 2026
4455c07
Version bump
kcw-grunt Apr 20, 2026
fcc51f9
fix: issue when user tries to send (#210)
kcw-grunt Apr 22, 2026
b220d0f
reformatted the test
kcw-grunt Apr 18, 2026
5d01e5a
Added More comprehensive Send Tests to cover better stability
kcw-grunt Apr 23, 2026
2ad22d0
Add WalletManager; make validateAddress instance
kcw-grunt Apr 23, 2026
f0e16f6
Updated the InstrumentedTest
kcw-grunt Apr 23, 2026
9a88ed3
adjust the config
kcw-grunt Apr 23, 2026
a11b4db
adjust config for running
kcw-grunt Apr 23, 2026
39cb5f4
Further fix
kcw-grunt Apr 23, 2026
b981834
Fixes the bug: BreadActivity.initializeViews
kcw-grunt Apr 23, 2026
7828223
Merge branch 'main' into release/v4.9.1
kcw-grunt Apr 24, 2026
4c0e7d3
updated README
kcw-grunt Apr 24, 2026
0bfe9d7
bump
kcw-grunt Apr 24, 2026
8c3f1b2
chore(i18n): auto-translate missing strings [skip ci] (#213)
kcw-grunt Apr 24, 2026
bc79335
Feat/add tutorial functionality (#214)
kcw-grunt Apr 24, 2026
2af613b
Feat/bitrefill in topsecret (#217)
kcw-grunt Apr 25, 2026
38be6d1
Feat/bitrefill in topsecret (#221)
kcw-grunt Apr 25, 2026
04e8546
added polish
kcw-grunt Apr 25, 2026
7224aff
Merge branch 'main' into develop
kcw-grunt Apr 27, 2026
c792f3e
✨ πŸ›οΈ πŸ› οΈ Fix/sendmodelonevent crash (#224)
kcw-grunt Apr 27, 2026
6efad7a
Fixxed the layout of the LTC fiat picker (#225)
kcw-grunt Apr 27, 2026
2025282
Refactored the analytics (#226)
kcw-grunt Apr 28, 2026
f403751
Merge branch 'main' into develop
kcw-grunt Apr 28, 2026
734b3d7
🧼 Techdebt/sync reduce rate fpf (#228)
kcw-grunt May 1, 2026
a20d678
bump
kcw-grunt May 1, 2026
d046259
Techdebt/sync reduce rate fpf (#229)
kcw-grunt May 3, 2026
9cc425d
Feat/add remote shop (#230)
kcw-grunt May 9, 2026
728f354
version bump
kcw-grunt May 10, 2026
e57563d
add part of test
kcw-grunt May 10, 2026
d0886db
Techdebt/improve shop (#232)
kcw-grunt May 28, 2026
44fcc8f
Added analytics when user shows invoice in shop (#233)
kcw-grunt May 28, 2026
89a8974
Techdebt/modules update (#235)
kcw-grunt Jun 6, 2026
9fbfeae
Fallinmoji closed branch (#241)
kcw-grunt Jul 6, 2026
143bdac
version bump
kcw-grunt Jul 6, 2026
bc615f5
Techdebt/polish interface (#242)
kcw-grunt Jul 16, 2026
28f8f56
Fix/polish clear set emojis (#243)
kcw-grunt Jul 17, 2026
81a8870
Set the clean process
kcw-grunt Jul 17, 2026
afdfcfb
Merge branch 'main' into release/v4.10.4
kcw-grunt Jul 17, 2026
b5ca771
Changed the pat
kcw-grunt Jul 17, 2026
26e5c90
polish yml
kcw-grunt Jul 17, 2026
134926c
Use typical GH TOKEN
kcw-grunt Jul 17, 2026
c45fa05
Refactor yml
kcw-grunt Jul 17, 2026
ec2a406
chore(i18n): auto-translate missing strings [skip ci] (#245)
github-actions[bot] Jul 17, 2026
f43bd4b
Unescaped the ' in the translated strings in non-exist
kcw-grunt Jul 17, 2026
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
6 changes: 2 additions & 4 deletions .github/workflows/auto-translate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.TRANSLATION_PAT_GHA_CLAUDE_JUL082026 }}

fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -58,7 +56,7 @@ jobs:
- name: Open Pull Request
if: steps.changes.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.TRANSLATION_PAT_GHA_CLAUDE_JUL082026 }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--title "🌍 Auto-translations: missing strings updated" \
Expand Down
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
[submodule "android-build-logic"]
path = android-build-logic
url = https://github.com/gruntsoftware/android-build-logic.git
[submodule "modules/bw-gdlib"]
path = modules/bw-gdlib
[submodule "bw-gdlib"]
path = bw-gdlib
url = https://github.com/gruntsoftware/bw-gdlib.git
branch = main
2 changes: 1 addition & 1 deletion android-build-logic
65 changes: 25 additions & 40 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import org.gradle.kotlin.dsl.androidTestImplementation
import org.gradle.kotlin.dsl.grunt
import org.gradle.kotlin.dsl.project

plugins {
alias(grunt.plugins.android.application)
Expand All @@ -18,25 +19,20 @@ val localProperties = gradleLocalProperties(rootDir, providers)

android {
namespace = "com.brainwallet"
compileSdk = 35
compileSdk = 36

firebaseCrashlytics {
nativeSymbolUploadEnabled = true
}

/// For screengrab testing
val screengrabPaperKey = localProperties
.getProperty("SCREENGRAB_PAPERKEY", "")
.split(" ")
.filter { it.isNotBlank() }
.joinToString(separator = ", ") { "\"$it\"" }
sourceSets["main"].assets.srcDir("${rootProject.projectDir}/bw-gdlib/assets")

defaultConfig {
applicationId = "ltd.grunt.brainwallet"
minSdk = 29
targetSdk = 35
versionCode = 202506336
versionName = "v4.9.4"
versionCode = 202506342
versionName = "v4.10.4"
multiDexEnabled = true
base.archivesName.set("${defaultConfig.versionName}(${defaultConfig.versionCode})")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -51,12 +47,6 @@ android {
arguments("-DANDROID_TOOLCHAIN=clang")
}
}

buildConfigField(
"String[]",
"SCREENGRAB_PAPERKEY",
"new String[] {$screengrabPaperKey}"
)
}

assetPacks.addAll(setOf(":install_time_asset_pack"))
Expand Down Expand Up @@ -92,7 +82,7 @@ android {
signingConfig = signingConfigs.getByName("release")
isDebuggable = false
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
resValue("string", "firebase_analytics_collection_enabled", "true")
ndk {
isDebuggable = false
Expand Down Expand Up @@ -128,24 +118,6 @@ android {
}
}
}

create("screengrab") {
dimension = "mode"

applicationId = "ltd.grunt.brainwallet.screengrab"
versionNameSuffix = "-screengrab"
resValue("string", "app_name", "Brainwallet (screengrab)")

externalNativeBuild {
cmake {
// When you specify a version of CMake, as shown below,
// the Android plugin searches for its binary within your
// PATH environmental variable.
cFlags("-DLITECOIN_TESTNET=0")
targets("core-lib")
}
}
}
}

testOptions {
Expand All @@ -167,6 +139,7 @@ android {
compileOptions {
sourceCompatibility = JavaVersion.valueOf("VERSION_${grunt.versions.jvm.target.get()}")
targetCompatibility = JavaVersion.valueOf("VERSION_${grunt.versions.jvm.target.get()}")
isCoreLibraryDesugaringEnabled = true
}
kotlin {
jvmToolchain(grunt.versions.jvm.target.get().toInt())
Expand Down Expand Up @@ -196,11 +169,11 @@ android {
}

dependencies {
implementation(project(":games"))
implementation(project(":iap"))
implementation(project(":core"))
implementation("androidx.webkit:webkit:1.9.0")
implementation(libs.androidx.benchmark.traceprocessor)
implementation(libs.androidx.ui.graphics)
testImplementation(testFixtures(project(":app")))
androidTestImplementation(testFixtures(project(":app")))
implementation(grunt.androidx.core.ktx)
Expand Down Expand Up @@ -240,7 +213,6 @@ dependencies {
implementation(libs.androidx.espresso.core)
implementation(libs.androidx.runtime)
implementation(libs.androidx.foundation)
implementation(libs.androidx.animation)
implementation(libs.play.services.games)
ksp(grunt.koin.annotation.compiler)
implementation(platform(libs.squareup.okhttp.bom))
Expand All @@ -256,17 +228,20 @@ dependencies {
implementation(libs.razir.progressbutton)
implementation(libs.appsflyer)
implementation(libs.android.installreferrer)
implementation("androidx.compose.animation:animation:1.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7")
implementation("io.coil-kt:coil-compose:2.0.0-rc01")
implementation(libs.androidx.material3)
testImplementation(libs.junit)
testImplementation(libs.mockk)
testImplementation(libs.turbine)
testImplementation(libs.slf4j.android)
testImplementation(libs.kotlinx.coroutines.tests)
implementation("androidx.compose.animation:animation:1.10.6")
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7")
implementation("io.coil-kt:coil-compose:2.0.0-rc01")
implementation("androidx.emoji2:emoji2-emojipicker:1.6.0")
testImplementation("io.mockk:mockk:1.13.5")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
testImplementation("app.cash.turbine:turbine:1.0.0")
implementation("androidx.core:core-splashscreen:1.0.1")
androidTestImplementation(platform(grunt.androidx.compose.bom))
androidTestImplementation("androidx.test:core-ktx:1.5.0")
androidTestImplementation(grunt.bundles.androidx.compose.ui.test)
Expand All @@ -278,9 +253,19 @@ dependencies {
androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("io.mockk:mockk-android:1.13.8")
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
val gdxVersion = "1.14.1"
val miniaudioVersion = "0.7"
implementation("com.badlogicgames.gdx:gdx-backend-android:${gdxVersion}")
implementation("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a")
implementation("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a")
implementation("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86")
implementation("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64")
implementation("ltd.grunt.brainwallet.gdx:core:1.14.1")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")


}

tasks.withType<Test> {
jvmArgs("-XX:+EnableDynamicAgentLoading")
}

3 changes: 3 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
-dontwarn java.lang.reflect.AnnotatedType
-dontwarn com.google.api.client.http.**
-dontwarn org.joda.time.**
-dontwarn com.badlogic.gdx.maps.tiled.AtlasTmxMapLoader$AtlasTiledMapLoaderParameters
-dontwarn com.badlogic.gdx.maps.tiled.TmxMapLoader$Parameters
-dontwarn com.badlogic.gdx.utils.StringBuilder

-keepclasseswithmembernames class * {
native <methods>;
Expand Down
41 changes: 29 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />

<queries>
<package android:name="com.twitter.android" />
<package android:name="com.instagram.android" />
</queries>
<application
android:name=".BrainwalletApp"
android:allowBackup="false"
Expand All @@ -51,32 +54,37 @@
android:theme="@style/Theme.Brainwallet"
android:windowSoftInputMode="stateVisible|adjustResize"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"
tools:replace="android:fullBackupContent,android:allowBackup">
tools:replace="android:theme,android:fullBackupContent,android:allowBackup">

<property android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY" android:value="true" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">

<meta-data
android:name="com.brainwallet.initializer.AppInitializer"
android:value="androidx.startup" />

<!-- TODO: Re-enable EmojiCompatInitializer in AndroidManifest.xml when -->
<!-- emoji support is implemented. -->
<!-- Disabled to prevent Context leak identified in Memory Profiler. -->
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="@string/androidx_startup"
tools:node="remove" />

</provider>
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="@string/androidx_startup"
tools:node="remove" />
</provider>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths" />
</provider>
<!-- Main Compose Activity -->
<activity
android:name=".ui.BrainwalletActivity"
android:exported="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -87,6 +95,7 @@
<activity
android:name=".presenter.activities.BreadActivity"
android:exported="true"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan">
<intent-filter>
Expand Down Expand Up @@ -115,41 +124,49 @@
android:name=".presenter.activities.settings.SyncBlockchainActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.settings.NotificationActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.intro.WriteDownActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.camera.ScanQRActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.DisabledActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.settings.NodesActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.camera.CameraActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>
<activity
android:name=".presenter.activities.settings.TestActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
/>

<service
Expand Down
55 changes: 55 additions & 0 deletions app/src/main/java/com/brainwallet/appreview/InAppReviewService.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.brainwallet.appreview

import android.app.Activity
import android.app.Application
import com.brainwallet.constants.BWConstants
import com.brainwallet.tools.manager.AnalyticsManager
import com.brainwallet.tools.manager.BRSharedPrefs
import com.google.android.gms.tasks.OnCompleteListener
import com.google.android.gms.tasks.Task
import com.google.android.play.core.review.ReviewInfo
import com.google.android.play.core.review.ReviewManagerFactory
import timber.log.Timber
import java.lang.Void

class InAppReviewService(
private val app: Application,
private val activityProvider: () -> Activity?,

) {
public fun showInAppReviewDialogIfNeeded() {
val activity = activityProvider() ?: return
if (!BRSharedPrefs.isInAppReviewDone(app) &&
BRSharedPrefs.getSendTransactionCount(app) > 2
) {
val manager = ReviewManagerFactory.create(app)
val request = manager.requestReviewFlow()
request.addOnCompleteListener(
OnCompleteListener { task: Task<ReviewInfo>? ->
AnalyticsManager.logCustomEvent(BWConstants._20241006_DRR)
if (task!!.isSuccessful()) {
val reviewInfo = task.getResult()
val flow = manager.launchReviewFlow(activity, reviewInfo)
flow.addOnCompleteListener(
OnCompleteListener { task1: Task<Void?>? ->
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
Timber.i(
"timber: In-app LaunchReviewFlow completed successful (%s)",
task1!!.isSuccessful()
)
if (task1.isSuccessful()) {
BRSharedPrefs.inAppReviewDone(app)
AnalyticsManager.logCustomEvent(BWConstants._20241006_UCR)
}
}
)
} else {
Timber.e(task.getException(), "In-app request review flow failed")
}
}
)
}
}
}
6 changes: 6 additions & 0 deletions app/src/main/java/com/brainwallet/constants/BWConstants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ object BWConstants {
const val PUT_PHRASE_NEW_WALLET_REQUEST_CODE: Int = 114
const val PUT_PHRASE_RECOVERY_WALLET_REQUEST_CODE: Int = 115
const val PROVE_PHRASE_REQUEST: Int = 119
const val SHOW_EMOJIS_REQUEST_CODE: Int = 120

const val PUT_EMOJIS_REQUEST_CODE: Int = 121

const val CLEAR_EMOJIS_REQUEST_CODE: Int = 122

/**
* Request codes for taking pictures
Expand All @@ -71,6 +76,7 @@ object BWConstants {
const val CURRENT_UNIT: String = "currencyUnit"
const val POSITION: String = "position"
const val PHRASE_WRITTEN: String = "phraseWritten"
const val EMOJIS_CHOSEN: String = "emojisChosen"
const val ALLOW_SPEND: String = "allowSpend"
const val USER_ID: String = "userId"
const val GEO_PERMISSIONS_REQUESTED: String = "geoPermissionsRequested"
Expand Down
Loading