388 Commits
Author SHA1 Message Date
Shubert Munthali 5b2cbe9516 Add unit tests package and migrate test_color.kt to unit testing 2025-07-11 14:50:59 +02:00
prudhvir3ddy 9bdfa31d55 Upgrade compileSDK, kotlin, AGP, compose, core libs 2025-07-11 17:15:54 +05:30
prudhvir3ddy 622ba5b787 release mode to be minified and shrinked 2025-07-11 16:58:18 +05:30
ShilohEye 33d273f268 Fix Android fragmentation for iOS/Rust compatibility
- Changed MAX_FRAGMENT_SIZE from 500 to 150 bytes to match iOS/Rust
- Fixed fragment ID generation to use 8 random bytes instead of string
- Implemented automatic fragmentation in BluetoothConnectionManager
- Added 20ms delay between fragments to match iOS/Rust implementation
- Updated fragment calculation to account for full packet overhead (34 bytes)

This ensures Android-generated fragments fit within iOS's default 185-byte BLE MTU,
fixing issues with commands like ?ls -la and ?ifconfig failing on iOS devices.
2025-07-10 19:25:52 -04:00
Kainoa Kanter 3941fe1f7e feat: add monochrome/themed icon for Android 12+ 2025-07-10 14:05:29 -07:00
Gaurav Vashisth 1098970810 fixes vertical padding in permission explanation 2025-07-10 23:20:14 +05:30
alpermelkeli 85f23c23fd implement channel password management at local and /pass command handling. 2025-07-10 18:56:55 +03:00
prudhvir3ddy ff9ba1c5c1 Merge branch 'main' of ssh://github.com/permissionlesstech/bitchat-android into prudhvir3ddy/version_catalogs 2025-07-10 17:49:02 +05:30
callebtc f47ed01243 bluetooth checking 2025-07-10 14:15:54 +02:00
prudhvir3ddy 07d0f1089f Refactor: Use Gradle version catalog
This commit introduces the Gradle version catalog (`libs.versions.toml`) to manage dependencies and plugin versions centrally.

Key changes:
- Added `gradle/libs.versions.toml` defining versions, libraries, plugins, and bundles.
- Updated `app/build.gradle.kts` to reference dependencies and plugins from the version catalog.
- Updated project-level `build.gradle.kts` to use plugin aliases from the version catalog.
2025-07-10 17:42:23 +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 8b5c19ace7 notifications 2025-07-10 12:08:22 +02:00
callebtc 797eee0257 fav 2025-07-10 12:03:42 +02:00
callebtc abe6246c3e faving? 2025-07-10 00:34:41 +02:00
callebtc 472c6e8d51 design 2025-07-10 00:29:22 +02:00
callebtc efbdf8c6ff icons 2025-07-10 00:20:03 +02:00
callebtc caf494c1bf ui 2025-07-10 00:17:22 +02:00
callebtc 215383e012 design 2025-07-10 00:03:15 +02:00
callebtc b6f281275a fixed 2025-07-09 21:51:04 +02:00
callebtc 3c0d145406 variable mtu clientside fix 2025-07-09 21:39:12 +02:00
callebtc 90750c2635 disable server, but client works 2025-07-09 21:10:20 +02:00
callebtc 250772a693 silent 2025-07-09 19:49:21 +02:00
callebtc 1d7defcbae rate limiting 2025-07-09 18:29:49 +02:00
callebtc dd8aa083b9 power saving 2025-07-09 15:47:54 +02:00
callebtc d3e258b442 precvent duplicate connections 2025-07-09 15:34:20 +02:00
callebtc d962ed8ccb logging 2025-07-09 15:04:43 +02:00
callebtc fffed8f31e style 2025-07-09 13:05:46 +02:00
callebtc 1d7bb8beab REFACTOR STEP 2: Extract mesh delegate handling to separate class
- Created MeshDelegateHandler.kt to handle all BluetoothMeshDelegate callbacks
- Created ChatViewModelUtils.kt for utility functions like haptic feedback
- ChatViewModel now delegates all mesh events to MeshDelegateHandler
- Final ChatViewModel size: 337 lines (down from 1000+ original)

This completes the refactoring while maintaining 100% functionality.
2025-07-09 00:44:53 +02:00
callebtc 56824b6594 REFACTOR: Break ChatViewModel into smaller specialized files
- Created ChatState.kt for centralized state management
- Created DataManager.kt for persistence operations
- Created MessageManager.kt for message handling and deduplication
- Created ChannelManager.kt for channel operations and encryption
- Created PrivateChatManager.kt for private chat functionality
- Created CommandProcessor.kt for IRC-style command processing

ChatViewModel.kt reduced from 1000+ lines to ~300 lines while maintaining 100% functionality.
All existing functionality preserved, just better organized.
2025-07-09 00:42:43 +02:00
callebtc 6d22aa7315 nice 2025-07-09 00:34:47 +02:00
callebtc 849b0845c4 MAJOR REFACTOR: Replace monolithic BluetoothMeshService with component-based architecture
 SUCCESSFULLY REFACTORED BluetoothMeshService.kt:
- Original: ~1000+ lines monolithic service
- New: 522 lines coordinator + 7 focused components

🏗️ ARCHITECTURE:
- **BluetoothMeshService**: Main coordinator (522 lines)
- **PeerManager**: Lifecycle & RSSI tracking (161 lines)
- **FragmentManager**: Message fragmentation (194 lines)
- **SecurityManager**: Security & encryption (236 lines)
- **StoreForwardManager**: Offline caching (295 lines)
- **MessageHandler**: Message processing (284 lines)
- **BluetoothConnectionManager**: BLE operations (611 lines)
- **PacketProcessor**: Packet routing (108 lines)

 MAINTAINED COMPATIBILITY:
- Exact same public API (ChatViewModel unchanged)
- 100% iOS protocol compatibility
- Same UUIDs, packet format, timing
- All existing functionality preserved

🎯 BENEFITS ACHIEVED:
- Better separation of concerns
- Easier unit testing (each component isolated)
- Improved maintainability and debugging
- Cleaner code structure
- Future extensibility

 BUILD STATUS: Compiles successfully with zero errors!
2025-07-08 23:46:59 +02:00
callebtc 3919373025 Add extracted components for BluetoothMeshService refactoring
- PeerManager.kt: Manages peer lifecycle, nicknames, and RSSI tracking (161 lines)
- FragmentManager.kt: Handles message fragmentation and reassembly (194 lines)
- SecurityManager.kt: Manages duplicate detection, replay protection, encryption (236 lines)
- StoreForwardManager.kt: Handles message caching for offline peers (295 lines)
- MessageHandler.kt: Processes different message types and relay logic (284 lines)
- BluetoothConnectionManager.kt: Manages BLE connections and GATT operations (611 lines)
- PacketProcessor.kt: Routes incoming packets to appropriate handlers (108 lines)

All components compile successfully and maintain same functionality as original monolithic service.
Total extracted: ~1789 lines into 7 focused components.
2025-07-08 23:44:24 +02:00
callebtc 9ba8dca82a seems to work 2025-07-08 23:38:35 +02:00
callebtc d40e2cbda8 deduplicate messages 2025-07-08 23:02:03 +02:00
callebtc d6a4e122b4 init 2025-07-08 20:37:46 +02:00