Commit Graph
38 Commits
Author SHA1 Message Date
callebtc 689f3db1f9 fix(mesh): address memory leaks and background persistence issues in Wi-Fi Aware
- Move message persistence and background notifications for Wi-Fi Aware into the service layer via MeshCore hooks.
- Fix memory leak in MainActivity by properly detaching WifiAwareMeshDelegate on pause.
- Ensure BluetoothMeshService is initialized before WifiAwareMeshService to guarantee shared GossipSyncManager instance.
- Deduplicate persistence logic from MainActivity delegate.
2026-01-10 22:45:23 +07:00
aidenvalu3GitHubaidenvalue <>
3a1589972b patches: wifi aware mesh refactor core (#549)
* Refactor WifiAware memory management and lifecycle handling

* Fix Wi-Fi Aware reconnection by ensuring callback unregistration and session watchdog

* fix(wifiaware): allow WifiAwareController to restart service if session drops

* Enhance WiFi Aware logging with network request timeouts and detailed callback status

* Ensure explicit release of WiFi Aware network callbacks on failure or disconnection

---------

Co-authored-by: aidenvalue <>
2026-01-05 15:08:18 +07:00
callebtcandGitHub 35030a05d8 Wifi aware skip bluetooth (#538)
* unify connection tracker for ble and wifi

* bluetooth optional
2026-01-04 02:02:24 +07:00
c12af45b6b Fix wifi aware routing (#534)
* Background persistence (#505)

* persistence step 1

* fix build

* messages in the background work, notifications not yet

* app state store

* DM icon shows up

* notification launches when app is closed!

* keep ui updated

* lifecycle fixes

* extensive logging, maybe revert later

* send nickname in announcement

* quit in notification

* setting in about sheet

* fix quit bitchat

* lifecycle fixes

* power mode based on background state

* stats for both direciotns

* fix graph persistence

* better counting

* count per device

* only compute when debug sheet is open? untested

* fix read receipts

* fix read receipts fully

* fix unread badge if messages have been read in focus

* foreground promotion fix

* fix app kill in notification

* adjust to new tor

* nice

* about sheet design

* bump version 1.6.0 (#524)

* Automated update of relay data - Sun Dec 14 06:06:53 UTC 2025

* bump targetSdk (#526)

* Automated update of relay data - Sun Dec 21 06:06:56 UTC 2025

* Automated update of relay data - Sun Dec 28 06:07:12 UTC 2025

* Prevent quit notification from reappearing (#530)

* shutdown sequence

* Prevent quit notification from reappearing

* Restrict force-finish broadcast

* Cancel quit shutdown on relaunch

* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork

* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding

* Fix Wi-Fi Aware connectivity and UI integration post-merge

- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.

* Enhance Wi-Fi Aware robustness and debug UI display

- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.

* Share GossipSyncManager across transports to prevent redundant message synchronization

- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.

* Restore VPN acquisition logic and improve peer cleanup

- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.

* fix wifi aware routing

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalue <>
2026-01-04 01:12:40 +07:00
463600a6c3 Fix wifi aware socket binding 2 (#536)
* Background persistence (#505)

* persistence step 1

* fix build

* messages in the background work, notifications not yet

* app state store

* DM icon shows up

* notification launches when app is closed!

* keep ui updated

* lifecycle fixes

* extensive logging, maybe revert later

* send nickname in announcement

* quit in notification

* setting in about sheet

* fix quit bitchat

* lifecycle fixes

* power mode based on background state

* stats for both direciotns

* fix graph persistence

* better counting

* count per device

* only compute when debug sheet is open? untested

* fix read receipts

* fix read receipts fully

* fix unread badge if messages have been read in focus

* foreground promotion fix

* fix app kill in notification

* adjust to new tor

* nice

* about sheet design

* bump version 1.6.0 (#524)

* Automated update of relay data - Sun Dec 14 06:06:53 UTC 2025

* bump targetSdk (#526)

* Automated update of relay data - Sun Dec 21 06:06:56 UTC 2025

* Automated update of relay data - Sun Dec 28 06:07:12 UTC 2025

* Prevent quit notification from reappearing (#530)

* shutdown sequence

* Prevent quit notification from reappearing

* Restrict force-finish broadcast

* Cancel quit shutdown on relaunch

* fix(wifi-aware): use bindSocket and scoped IPv6 instead of bindProcessToNetwork

* Merge branch 'upstream/main' into fix/wifi-aware-socket-binding

* Fix Wi-Fi Aware connectivity and UI integration post-merge

- Replace bindProcessToNetwork with bindSocket for VPN compatibility.
- Implement Scoped IPv6 address resolution (aware0) for mesh routing.
- Bridge Wi-Fi Aware incoming messages to AppStateStore for UI visibility.
- Fix syntax errors and variable name conflicts in Debug UI.

* Enhance Wi-Fi Aware robustness and debug UI display

- Clean up transport resources (sockets, server sockets, network callbacks) immediately on peer disconnection.
- Implement resolveScopedAddress to show scoped IPv6 (e.g., %aware0) in Debug UI.
- Fix Map type mismatch warning in ChatViewModel bridge.
- Filter self-ID from peer cleanup tables to prevent recursive self-removal.

* Share GossipSyncManager across transports to prevent redundant message synchronization

- Registered BluetoothMeshService's GossipSyncManager as a singleton in MeshServiceHolder.
- Modified WifiAwareMeshService to use the shared GossipSyncManager if available.
- Added background cleanup for peer mappings on socket disconnection.
- Fixed Kotlin type mismatch during nickname map merging.

* Restore VPN acquisition logic and improve peer cleanup

- Revert removal of NET_CAPABILITY_NOT_VPN to allow hardware handle acquisition while VPN is active.
- Refactor handlePeerDisconnection to more reliably cleanup initial and routed IDs.
- Switch cleanup logging to debug level to reduce log noise.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalue <>
2026-01-03 23:39:54 +07:00
callebtc 1296e117ba werk 2025-10-22 04:58:05 +02:00
callebtc f6cb73ff89 wifi aware wip 2025-10-22 04:09:00 +02:00
Developer ChunkandGitHub 9535ca8940 feat: Add tablet landscape orientation support (#490)
- Tablets now support landscape mode, phones remain portrait-only
- Add OrientationAwareActivity base class for orientation management
- Add DeviceUtils.isTablet() for runtime device detection
- Update MainActivity and GeohashPickerActivity to extend OrientationAwareActivity
- Uses multiple detection criteria (screen size, density, configuration)
Fixes #480
2025-10-20 20:14:50 +02:00
callebtcandGitHub f99cb46b26 Location notes (#482)
* try 1

* works

* equalize UI with ios

* ui cleanup

* geohash chats: no building

* load notes in background

* insta

* simplify and tor icon change

* icons nice

* refactor

* unify location enabled / disabled

* cooler

* simplify, doesnt subscribe right away

* load when clicked

* plus minus location notes

* load when tor is available

* translations

* fix transalations

* implement review comments
2025-10-18 14:19:53 +02:00
callebtcandGitHub 1a398b16ef Redesign: Permissions screen, battery optimization, location sheet (#415)
* update permissions screen design

* battery optimization screen

* remove init screen

* skip init screen on load

* skip on load only

* location sheet design wip

* denser location sheet

* location sheet layout fix
2025-09-14 04:22:56 +02:00
Héctor de IsidroandGitHub bbf5918896 Fix edge-to-edge layout issues (#367)
* Remove redundant setDecorFitsSystemWindows call

* Fix edge-to-edge layout issues
2025-09-02 14:25:45 +02:00
callebtcandGitHub b62b15a21f Nip13 pow (#357)
* add pow

* animation

* matrix style

* animation better

* improve animation

* improve animation

* works

* fix jump

* difficulty indicator

* 10 is default

* animation runs forever

* pow in message timestamp

* pow works

* default on

* adjust animation

* no printing
2025-08-31 13:23:22 +02:00
lollerfirstandGitHub 28abd3c593 allow user to select a theme preference over light/dark/system (#318) 2025-08-28 08:14:46 +02:00
callebtcandGitHub 7106be4b07 country -> region, region –> province (#298) 2025-08-23 15:44:46 +02:00
callebtcandGitHub 16c55a4105 Statusbar seamless (#289)
* wip status bar

* header fix
2025-08-23 02:36:36 +02:00
callebtcandGitHub f13f3063c9 Geohash notifications (#288)
* mention notifications

* notifications

* warning
2025-08-23 01:35:46 +02:00
a0d1c6f77c Add Real-Time Bluetooth State Monitoring to OnboardingFlowScreen (#55)
* Add bluetooth monitor function to onboarding flow screen

* Adds function that checks bluetooth status in real time

* Add bluetooth monitor function to onboarding flow screen

* Refactor

* Comment button to manually check BT state

* Original commits

* feat(ui): Remove auto-trigger for Bluetooth enable prompt

* feat(ui): Remove auto-trigger for Bluetooth enable prompt

* feat(ui): Remove BluetoothStatusBanner. Pending approval on feature, will add in a new PR

* Refactor and fix conflicts

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2025-08-05 23:49:04 +02:00
callebtcandGitHub e1bafcf1a5 Merge branch 'main' into code_readiblity_improvement 2025-07-19 09:41:09 +02:00
ganpat singhandGitHub f657c6247f Merge branch 'main' into code_readiblity_improvement 2025-07-18 10:57:13 +05:30
Faded 7972439c14 Merge branch 'main' into fix/wrong-cursor-location 2025-07-18 05:19:19 +05:00
ganpatsingh 3fddb3f594 1. remove unused methods in MainActivity.kt
2. replace android.util.log with log
2025-07-18 00:50:57 +05:30
Mohamad Hamade d730acbb79 Refactor: Migrate MainViewModel to use StateFlow
This commit refactors the `MainViewModel` to use `StateFlow` instead of `mutableStateOf` for managing its observable properties. This change improves the way UI state is handled and observed, aligning with modern Android development best practices.

Additionally, `OnboardingState.kt` has been moved to the `onboarding` package for better organization.
2025-07-16 01:13:42 +03:00
Mohamad Hamade 245181d736 Refactor: Introduce MainViewModel for onboarding state management
This commit introduces a `MainViewModel` to manage the UI state for the onboarding flow. This change centralizes the onboarding state (including Bluetooth status, location status, error messages, and loading indicators) within the ViewModel, allowing it to survive configuration changes and simplifying state management within `MainActivity`.

Key changes:
- Created `MainViewModel.kt` to hold and manage onboarding-related UI state.
- Moved onboarding state variables (e.g., `onboardingState`, `bluetoothStatus`, `locationStatus`) from `MainActivity` to `MainViewModel`.
- Updated `MainActivity` to observe and update onboarding state through the `MainViewModel`.
- Created `OnboardingState.kt` to define the possible states of the onboarding process.
- Ensured that the onboarding process is not restarted on configuration changes by checking `mainViewModel.onboardingState` before initiating.
2025-07-15 02:24:41 +03:00
Faded fe57c5684e feat(battery): add battery optimization management for background reliability
Add battery optimization permission and management system to ensure app runs reliably in background:
- Add REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission
- Create BatteryOptimizationManager to handle battery optimization checks and requests
- Add battery optimization UI screens and flow in onboarding
- Integrate battery optimization checks into MainActivity flow
2025-07-14 14:23:59 +05:00
callebtc 930081bba0 add location services check 2025-07-13 20:27:43 +02:00
callebtc 887ca0119e Merge branch 'main' into adjust-scan-intervals 2025-07-13 19:43:58 +02:00
callebtc 2a0f84b53b adjust scan intervals and reduce logging 2025-07-13 17:16:31 +02:00
callebtcandGitHub 0d54d60dd5 Merge pull request #60 from prudhvir3ddy/prudhvir3ddy/upgrade_deps
Upgrade compileSDK, kotlin, AGP, compose, core libs
2025-07-13 17:09:00 +02:00
callebtc ad6dc3680b permissions layout 2025-07-12 17:40:25 +02:00
callebtc d490393de6 back gesture works 2025-07-12 17:32:08 +02:00
callebtc 035273011f fix startup 2025-07-12 15:42:37 +02:00
prudhvir3ddy 9bdfa31d55 Upgrade compileSDK, kotlin, AGP, compose, core libs 2025-07-11 17:15:54 +05:30
callebtc ef6a815b4c bluetooth check 2025-07-10 14:01:42 +02:00
callebtc 3cee97ccc7 check bluetooth 2025-07-10 13:49:52 +02:00
callebtc f9f56794d3 onboarding 2025-07-10 13:15:28 +02:00
callebtc 37d605b934 fix notifications 2025-07-10 12:48:04 +02:00
callebtc dd8aa083b9 power saving 2025-07-09 15:47:54 +02:00
callebtc d6a4e122b4 init 2025-07-08 20:37:46 +02:00