* wifi aware wip
* wifi aware wip
* starting to work
* werk
* dms work
* wip
* 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 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 <>
* 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 <>
* unify connection tracker for ble and wifi (#537)
* unify connection tracker for ble and wifi
* cleanup nicely
* Wifi aware skip bluetooth (#538)
* unify connection tracker for ble and wifi
* bluetooth optional
* refactor mesh core
* tests
* share gossip
* refresh peer list more often
* 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 <>
* fix: wifi aware mesh private dms (#561)
* fix(wifi-aware): restore peer check and remove aggressive session restarts
* synchronized access to sockets.
* clear old peer socket `onClientConnected` if one was found.
* address second round of review
* fix: Restart publish session on termination in WifiAwareMeshService
* fix: cleanup connection tracker resources when handling peer disconnection without active socket
---------
Co-authored-by: aidenvalu3 <>
* 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.
* wifi aware working
* more robust
* fragments work
* new files
* wifi improvements
* handshake works
* improve
* wifi mesh more robust
* fix review
* check for support
* wifi aware fixes
---------
Co-authored-by: aidenvalue <>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: aidenvalu3 <erendentman@gmail.com>
Co-authored-by: a1denvalu3 <43107113+a1denvalu3@users.noreply.github.com>
Co-authored-by: CC <cc@ggg.local>
* fix: Ensure empty neighbor lists in newer announcements clear mesh edges
- Refactored MeshGraphService.updateFromAnnouncement to prioritize timestamp checks.
- Treated null neighbor lists (omitted TLV) as empty lists to allow peer disconnection/isolation updates to propagate.
- Added MeshGraphServiceTest to verify timestamp logic and edge eviction.
* fix(test): Use TestOnly API to reset singleton instead of reflection
- Added MeshGraphService.resetForTesting()
- Updated MeshGraphServiceTest to use the new API, avoiding fragile reflection on companion object fields.
* fix(security): Clear in-memory keys during panic mode #588
* feat: Recreate mesh service after panic clear (#602)
* feat: Recreate mesh service after panic clear
This commit refactors the panic clear process to ensure a new mesh identity is immediately created and applied.
Previously, the `ChatViewModel` would clear sensitive data, but the recreation of the `BluetoothMeshService` was handled externally. This could lead to a delay or failure in adopting the new identity.
Key changes:
- Introduces `MeshServiceHolder` to manage the lifecycle of the `BluetoothMeshService` instance.
- Adds `recreateMeshServiceAfterPanic()` to `ChatViewModel`, which now explicitly clears the old service instance and creates a new one with a regenerated identity.
- The `meshService` property in `ChatViewModel` is now a `var` to allow it to be replaced with the fresh instance post-panic.
- The new service is started, and a broadcast announcement is sent immediately, ensuring the new peer ID is used on the network.
* fix: Ensure mesh service is properly managed in foreground service
* refactor: Decouple handlers from direct service reference
This commit updates the `VerificationHandler` and `MediaSendingManager` to receive the `meshService` via a lambda function (`getMeshService`) instead of a direct reference.
This change decouples the handlers from the service instance, preventing them from holding a stale reference if the service reconnects or changes. By invoking the lambda to get the current service instance when needed, it ensures they always interact with the active `meshService`.
* fix: restart bluetooth
---------
Co-authored-by: Moe Hamade <69801237+moehamade@users.noreply.github.com>
* refactor: abstract LocationProvider, use FusedLocationProvider
* Refactor: Sync permission state on check
Replaces manual updatePermissionState calls with a unified checkAndSyncPermission method. This ensures that _permissionState flow always reflects the actual system permission status whenever it is checked (e.g. in requestOneShotLocation), preventing desync issues when permissions are revoked at runtime.
* Refactor: Add timeout and tracking to SystemLocationProvider
Implements robust cleanup and timeout logic for location requests.
- SystemLocationProvider: Adds 30s timeout and listener tracking for legacy one-shot requests to prevent memory leaks on pre-Android 11 devices.
- FusedLocationProvider: Adds 30s duration to requests.
- LocationProvider: Adds cancel() method for full resource cleanup.
- LocationChannelManager: Ensures cancel() is called during cleanup.
* try catch
* location manager improvements
* fix: resolve compilation errors and improve location state handling
- Fix missing imports and stray braces in LocationChannelManager
- Implement checkSystemLocationEnabled and BroadcastReceiver for location state
- Order class members for correct initialization
- Consolidate UI refresh logic in LocationChannelsSheet
* fix: guard against stale geocoding results on legacy devices
- Add isActive check after blocking Geocoder.getFromLocation call
- Prevent stale results from overwriting state after job cancellation
* try catch the foreground location service if not available
* ask for background permissions
* background permissions in onboarding
* small improvements
* 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
* 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
* english done
* de
* more extraction
* wip strings en
* translations work
* remove unneeded translations
* remove notification message
* add languages
* new languages
* tor voice wip
* worky BLE a bit
* can send sound
* remove tor
* ui cleanup
* recording time
* progress bar color
* nicknames for audio
* onboarding permissions no microphone
* may work
* fix destionation
* extend
* refactor voice input component
* fix keyboard collapse issue
* send images
* wip image open
* image sending works
* wip waveforms
* better
* better animation
* fix cursor for sending audio
* image sending animation
* image sending animation
* full screen image viewer
* gossip sync for fragments too
* reduce delays
* fix keyboard focus
* use v2 for file transfers
* do not sync fragments
* scrollable image viewer
* ui
* ui adjustments
* nicer animation
* seek through audio
* add spec
* add more details to documentation
* File sharing E2E:
- Add TLV BitchatFilePacket, FileSharingManager
- Implement sendFileNote in ChatViewModel
- File receive path: save to files/incoming and render [file] messages with FileMessageItem or FileSendingAnimation during transfer
- SAF FilePickerButton and dispatcher wiring; image/file choice to follow in MediaPickerOptions
- Add FileViewerDialog with system open/save, FileProvider and file_paths
- Hook transfer progress to file sending UI
- Manifest: READ_MEDIA_* and FileProvider
- Fix MessageHandler saving and prefix for non-image payloads
- Add helper utils (FileUtils)
* kinda wip
* fix buttons
* files half working
* wip file transfer
* file packet has 2-byte TLV and chunks. it wokrs but it sucks
* clean
* remove gossip sync for fragments
* fix audio and image rendering
* adjust FILE_SIZE TLV size too
* cleanup
* haptic
* private messages media
* read receipts for media
* use enum for message type not string
* delivery ack checks dont push content
* check
* animation fix
* refactor
* ui adjustments
* comments
* refactor
* fix crash on send and receive of the same file
* refactor notifications
* tests
* feat(debug): add DebugSettingsManager + DebugSettingsSheet scaffold and AboutSheet entry; groundwork for verbose logging, GATT controls, relay stats, device/scan views
* fix(debug): wire debug sheet launch via onShowDebug in AboutSheet from ChatScreen; add public start/stop server/client methods}
* fix(about): remove misplaced debug item block inside PoW section; keep debug launcher managed by ChatScreen only
* feat(debug): wire DebugSettingsSheet role switches to explicit startServer/stopServer and startClient/stopClient; expose role controls + disconnectAll on BluetoothConnectionManager; fix syntax error; build passes
* feat(debug): add connect/disconnect helpers; wire DebugSettingsSheet connect/disconnect actions to BluetoothConnectionManager
* feat(debug): add debug settings button at bottom of AboutSheet; wire onShowDebug callback to open DebugSettingsSheet from ChatScreen
* feat(debug): wire verbose logging into chat view via DebugSettingsManager; add rolling relay stats; push connected devices and scan results; ensure GATT role stop closes connections; log incoming packets and relay events; add UI polling for devices; build passes
* chore(debug-branch): remove unrelated files that were mistakenly added in first commit; keep only intended debug settings changes
* fix(chat): prevent mesh→geohash leak
Root cause:
- DebugSettingsManager→chat bridge appended system logs to the global timeline regardless of active channel
- MeshDelegateHandler added public mesh messages to UI unconditionally
Fixes:
- Only inject debug system messages when selected location channel is Mesh
- Only add public mesh messages to UI when Mesh is selected (still send notifications)
Build: ./gradlew assembleDebug
}
* fix(timeline): restore message persistence across channel switches
Root cause:
- NostrGeohashService.switchLocationChannel() called messageManager.clearMessages()
which wiped ALL messages (mesh + debug + geohash) from main timeline
- Geohash events were adding to main timeline, causing cross-contamination
Fixes:
- Remove messageManager.clearMessages() from channel switching
- ChatScreen displayMessages now routes to separate storage:
- Mesh: messages (main timeline, includes debug logs when Mesh selected)
- Geohash: viewModel.getGeohashMessages(geohash) from separate history
- Private: privateChats[peerID]
- Channels: channelMessages[channel]
- Geohash events no longer add to main timeline, only to geohash history
- Mesh messages always stored to preserve history when switching away
Result: Each chat type has persistent separate storage, no message loss
* Debug/relay logs: use MessageType names; include device route in verbose packet logs.
* Verbose device-peer assignment and connection/disconnection logs with peerId, deviceId, nickname; packet relay log uses MessageType names.}
* Debug logs API: include nickname and deviceId for incoming/relay; update callers.}
* Fix compile: import MessageType; correct debug manager API usage and remove stray insertion; build.}
* Respect relay toggle; helper to log relay with deviceId.}
* PacketRelayManager: add relay toggle and unified logging helper; clean file header comments; build fixes.}
* changes
* Geohash local echo: do not add to mesh timeline; rely on geohash history and ChatScreen display for location channels.
* persisting
* persist debug settings
* gitignore
* gatt server / client controls
* debugger
* max connection settings and graph
* more graph
* better logging
* refactor logging