Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 5 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
"Bash(git check-ignore:*)",
"Bash(npm view:*)",
"Bash(npx expo-doctor:*)",
"Bash(npm ls:*)"
"Bash(npm ls:*)",
"Bash(npx expo prebuild:*)",
"Bash(npx expo run:android:*)",
"Bash(./gradlew assembleDebug:*)",
"Bash(echo:*)"
]
}
}
28 changes: 15 additions & 13 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ android {
}
}

// Exclude old Android Support libraries that conflict with AndroidX
configurations.all {
exclude group: 'com.android.support', module: 'support-compat'
exclude group: 'com.android.support', module: 'support-v4'
}

// Apply static values from `gradle.properties` to the `android.packagingOptions`
// Accepts values in comma delimited lists, example:
// android.packagingOptions.pickFirsts=/LICENSE,**/picasa.ini
Expand All @@ -156,17 +162,15 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation platform('com.google.firebase:firebase-bom:34.7.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'androidx.core:core-ktx:1.16.0'
implementation 'androidx.work:work-runtime-ktx:2.10.5'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.compose.ui:ui:1.9.4'
implementation 'androidx.compose.material3:material3:1.3.2'
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'

// AndroidX Preference for Settings activity
implementation("androidx.preference:preference-ktx:1.2.1")

// WorkManager for background widget updates
implementation("androidx.work:work-runtime-ktx:2.9.0")

// Material Components for segmented control
implementation("com.google.android.material:material:1.11.0")

def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
Expand All @@ -192,5 +196,3 @@ dependencies {
implementation jscFlavor
}
}

apply plugin: 'com.google.gms.google-services' // Google Services plugin
8 changes: 2 additions & 6 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# React Native and Hermes
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }

# react-native-reanimated
-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }

# Add any project specific keep options here:
# Add any project specific keep options here:
2 changes: 2 additions & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
</manifest>
2 changes: 2 additions & 0 deletions android/app/src/debugOptimized/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
</manifest>
109 changes: 4 additions & 105 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,56 +1,24 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:installLocation="auto">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.DETECT_SCREEN_CAPTURE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<queries>
<intent>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="http"/>
</intent>
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:largeHeap="true" android:extractNativeLibs="true" android:usesCleartextTraffic="true" android:supportsRtl="true" android:theme="@style/AppTheme" android:networkSecurityConfig="@xml/network_security_config" android:configChanges="uiMode" android:enableOnBackInvokedCallback="false">
<meta-data android:name="com.dieam.reactnativepushnotification.channel_create_default" android:value="true"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description" android:value="Notifications about incoming payments"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name" android:value="HRZN notifications"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="@color/white"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="true"/>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:supportsRtl="true" android:enableOnBackInvokedCallback="false">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false"/>
<meta-data android:name="firebase_messaging_auto_init_enabled" android:value="false"/>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<activity android:name=".MarketWidgetConfigureActivity" android:exported="true" android:theme="@style/Theme.AppCompat.Light">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>
</activity>
<activity android:name=".SettingsActivity" android:label="@string/settings_title" android:exported="true" android:theme="@style/Theme.AppCompat.DayNight.DarkActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
<activity android:name=".MainActivity" android:label="@string/app_name" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|locale|layoutDirection" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|locale|layoutDirection" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -59,78 +27,9 @@
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="exp+hrzn"/>
<data android:scheme="com.hrznbtc.hrzn"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="file" android:mimeType="application/octet-stream" android:pathPattern=".*\\.psbt"/>
<data android:scheme="com.hrznbtc.hrzn"/>
</intent-filter>
<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="bitcoin"/>
<data android:scheme="lightning"/>
<data android:scheme="hrzn"/>
<data android:scheme="lapp"/>
<data android:scheme="blue"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:scheme="com.hrznbtc.hrzn"/>
</intent-filter>
<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="file" android:mimeType="application/octet-stream" android:pathPattern=".*\\.*"/>
<data android:scheme="com.hrznbtc.hrzn"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/octet-stream" android:pathPattern=".*\\.psbt"/>
<data android:scheme="com.hrznbtc.hrzn"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.EDIT"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" android:pathPattern=".*\\.psbt"/>
<data android:scheme="com.hrznbtc.hrzn"/>
<data android:scheme="exp+hrzn"/>
</intent-filter>
</activity>
<provider android:name="androidx.core.content.FileProvider" android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/>
</provider>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher"/>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<receiver android:name=".BitcoinPriceWidget" android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
<action android:name="android.intent.action.SCREEN_ON"/>
<action android:name="android.intent.action.SCREEN_OFF"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/bitcoin_price_widget_info"/>
</receiver>
<receiver android:name=".MarketWidget" android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="@xml/market_widget_info"/>
</receiver>
<activity-alias android:name=".SettingsActivityAlias" android:label="HRZN Settings" android:exported="true" android:targetActivity=".SettingsActivity">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity-alias>
</application>
</manifest>
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions android/app/src/main/res/drawable/rn_edit_text_material.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"
>
>

<selector>
<!--
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
Expand Down
Binary file not shown.
6 changes: 6 additions & 0 deletions android/app/src/main/res/drawable/widget_preview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#F7931A" />
<corners android:radius="16dp" />
</shape>
18 changes: 5 additions & 13 deletions android/app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<resources>
<color name="background_color">#000000</color>
<color name="widget_background">#1B1B1F</color>
<!-- Widget colors (dark/night theme) -->
<color name="text_primary">#FFFFFF</color>
<color name="text_secondary">#D3D3D3</color>
<color name="button_background_color">#3A3A3C</color>
<color name="button_text_color">#ffffff</color>
<color name="button_alternative_text_color">#ffffff</color>
<color name="button_disabled_background_color">#3A3A3C</color>
<color name="button_disabled_text_color">#9aa0aa</color>
<color name="form_border_color">#202020</color>
<color name="foreground_color">#ffffff</color>
<color name="alternative_text_color">#9aa0aa</color>
<color name="ripple_color">#1Affffff</color>
<color name="ripple_color_selected">#1A0A84FF</color>
<color name="text_secondary">#AAAAAA</color>
<color name="container_green">#155724</color>
<color name="container_red">#721C24</color>
<color name="widget_background">#1C1C1E</color>
</resources>
70 changes: 37 additions & 33 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
<resources>
<color name="white">#FFF</color>
<color name="background_color">#FFFFFF</color>
<color name="widget_background">#FFFFFF</color>
<color name="text_primary">#0C234F</color>
<color name="text_secondary">#949494</color>
<color name="widget_background_color">#121212</color>
<color name="widget_text_color">#FFFFFF</color>
<color name="container_green">#4ADCBA</color>
<color name="container_red">#F83661</color>
<color name="button_background_color">#ccddf9</color>
<color name="button_text_color">#0c2550</color>
<color name="button_alternative_text_color">#2f5fb3</color>
<color name="button_disabled_background_color">#eef0f4</color>
<color name="button_disabled_text_color">#9aa0aa</color>
<color name="form_border_color">#d2d2d2</color>
<color name="foreground_color">#0c2550</color>
<color name="alternative_text_color">#9aa0aa</color>
<color name="ripple_color">#1A0c2550</color>
<color name="ripple_color_selected">#1A2f5fb3</color>
<color name="button_background_color_dark">#3A3A3C</color>
<color name="button_text_color_dark">#ffffff</color>
<color name="button_alternative_text_color_dark">#ffffff</color>
<color name="button_disabled_background_color_dark">#3A3A3C</color>
<color name="button_disabled_text_color_dark">#9aa0aa</color>
<color name="form_border_color_dark">#202020</color>
<color name="foreground_color_dark">#ffffff</color>
<color name="alternative_text_color_dark">#9aa0aa</color>
<color name="ripple_color_dark">#1Affffff</color>
<color name="ripple_color_selected_dark">#1A0A84FF</color>
<color name="iconBackground">#ffffff</color>
<color name="colorPrimary">#023c69</color>
<color name="colorPrimaryDark">#F7931A</color>
<color name="splashscreen_background">#F7931A</color>
<!-- Required app colors -->
<color name="colorPrimary">#F7931A</color>
<color name="colorPrimaryDark">#F7931A</color>
<color name="splashscreen_background">#F7931A</color>
<color name="iconBackground">#ffffff</color>

<color name="white">#FFF</color>
<color name="background_color">#FFFFFF</color>
<color name="widget_background">#FFFFFF</color>
<color name="text_primary">#0C234F</color>
<color name="text_secondary">#949494</color>
<color name="widget_background_color">#121212</color>
<color name="widget_text_color">#FFFFFF</color>
<color name="container_green">#4ADCBA</color>
<color name="container_red">#F83661</color>

<color name="button_background_color">#ccddf9</color>
<color name="button_text_color">#0c2550</color>
<color name="button_alternative_text_color">#2f5fb3</color>
<color name="button_disabled_background_color">#eef0f4</color>
<color name="button_disabled_text_color">#9aa0aa</color>
<color name="form_border_color">#d2d2d2</color>
<color name="foreground_color">#0c2550</color>
<color name="alternative_text_color">#9aa0aa</color>
<color name="ripple_color">#1A0c2550</color>
<color name="ripple_color_selected">#1A2f5fb3</color>

<color name="button_background_color_dark">#3A3A3C</color>
<color name="button_text_color_dark">#ffffff</color>
<color name="button_alternative_text_color_dark">#ffffff</color>
<color name="button_disabled_background_color_dark">#3A3A3C</color>
<color name="button_disabled_text_color_dark">#9aa0aa</color>
<color name="form_border_color_dark">#202020</color>
<color name="foreground_color_dark">#ffffff</color>
<color name="alternative_text_color_dark">#9aa0aa</color>
<color name="ripple_color_dark">#1Affffff</color>
<color name="ripple_color_selected_dark">#1A0A84FF</color>
</resources>
Loading
Loading