- Removed separate VirtualDisplay creation to avoid MediaProjection conflict
- Switched to lightweight initialization approach without creating new VirtualDisplay
- Modified captureFrame() to accept Bitmap data from existing screen capture system
- Updated ScreenCaptureService to provide bitmap data via convertImageToMat -> matToBitmap
- Cleaned up unused ImageReader and VirtualDisplay references
- Fixed "Don't re-use the resultData" SecurityException
Key changes:
- LongScreenshotCapture now works as a bitmap processor, not a separate capture system
- Reuses existing MediaProjection infrastructure without conflicts
- Maintains separation of concerns while sharing capture resources efficiently
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Moved LongScreenshotCapture initialization to be lazy/on-demand
- Added initializeLongScreenshotSystem() method with detailed logging
- Now attempts initialization when startLongScreenshot() is called
- Removed early initialization that was failing due to timing issues
- Added comprehensive debug logging to track initialization process
This should resolve the "Long screenshot system not initialized" error
by ensuring MediaProjection is fully available before initialization.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Extended ScreenCaptureManager interface with getMediaProjection() and getScreenDensity()
- Implemented MediaProjection sharing in ScreenCaptureManagerImpl
- Fixed LongScreenshotCapture initialization with proper MediaProjection access
- Simplified captureFrame() method to directly acquire images from ImageReader
- Added proper initialization checks and error handling in ScreenCaptureService
This resolves the "Cannot start collection - not initialized" error by ensuring
LongScreenshotCapture is properly initialized with the shared MediaProjection
instance during ScreenCaptureService startup.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created LongScreenshotCapture.kt with independent screenshot collection
- Extended DetectionUIEvents/DetectionUICallbacks for long screenshot events
- Updated DetectionController with long screenshot event handlers
- Enhanced EnhancedFloatingFAB with dynamic menu system for long screenshots
- Integrated long screenshot system into ScreenCaptureService
- Added proper error handling, progress tracking, and cleanup
- Works alongside existing MediaProjection without interference
- Thread-safe screenshot queue management with proper memory management
Key Features:
- 📸 LONG SHOT button in floating orb menu
- Dynamic menu (CAPTURE/FINISH/CANCEL) in long screenshot mode
- Blue orb color indicates long screenshot mode active
- Real-time screenshot count tracking
- Independent capture system using shared MediaProjection
- Complete separation from existing detection functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Refactored DetectionController with modern async patterns and proper separation of concerns
- Enhanced YOLO inference engine with improved error handling and resource management
- Updated floating FAB UI with better state management and user feedback
- Added comprehensive project documentation in CLAUDE.md including build commands
- Integrated Atlassian workspace configuration for project management
- Cleaned up legacy backup files and improved code organization
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added ML Kit script-specific recognizers for Japanese, Chinese, Korean
- Implemented multi-script OCR with intelligent fallback logic
- Uses parallel recognition for nickname/species fields only
- Maintains performance by using Latin recognizer for stats/types
- Successfully detects Japanese Pokemon names like "二ン フィイア"
- Removed Tesseract dependencies and cleaned up unused code
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Modern Kotlin Patterns Applied:
- **Sealed classes**: CoordinateTransformMode hierarchy replaces string constants
- Type-safe coordinate transformation modes (LETTERBOX, DIRECT, HYBRID)
- Better IDE support with exhaustive when statements
- Self-documenting with descriptions for each mode
- **Extension functions**: Mat operation utilities for better readability
- Mat.safeRelease() for safe resource cleanup
- Mat.useSafely() for try-finally resource management
- Mat.ensureBGRFormat() for type-safe color space conversion
- **Inline functions**: Performance-critical operations with zero overhead
- safeMatOperation<T> for error handling with fallbacks
- useSafely for resource management patterns
## Comprehensive Documentation Added:
- **Class-level documentation**: Complete API overview with architecture features
- **Method documentation**: Detailed KDoc for complex algorithms
- **Algorithm explanation**: parseNMSOutput with step-by-step breakdown
- **Parameter documentation**: @param and @return annotations
- **Coordinate transformation**: Mathematical explanation of each mode
## Key Improvements:
- Type safety: String-based modes → Sealed class hierarchy
- Readability: Extension functions make Mat operations clearer
- Performance: Inline functions eliminate overhead
- Maintainability: Comprehensive documentation for complex logic
- IDE Support: Better autocomplete and type checking
The codebase now follows modern Kotlin best practices while maintaining
100% backward compatibility and performance.
Related todos: #modernize-and-document, #add-documentation, #modern-kotlin
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove INPUT_SIZE, NUM_DETECTIONS, NUM_CLASSES constants
- Use generic fallback values (640, 300, 96) instead of named constants
- All model metadata now extracted dynamically from ONNX runtime at initialization
- Fallbacks only used if dynamic extraction fails (safety net)
- Ensures complete consistency between model training and inference
The system now:
1. Extracts input size from ONNX model input tensor shape
2. Extracts detection count from ONNX model output tensor shape
3. Extracts class count from dataset.yaml (via ClassificationManager)
4. Infers output features per detection from model output shape
This eliminates all hardcoded assumptions about the specific model being used.
Related todos: #remove-hardcoded-constants
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove ENABLE_MULTI_PREPROCESSING, ENABLE_CONTRAST_ENHANCEMENT, ENABLE_SHARPENING, ENABLE_ULTRALYTICS_PREPROCESSING flags
- Delete detectWithMultiplePreprocessing() method (complex parallel execution)
- Delete enhanceImageForDetection() method (CLAHE contrast enhancement)
- Delete applySharpeningFilter() method (convolution sharpening)
- Delete preprocessOriginalStyle() method (simple resize)
- Simplify detectWithPreprocessing() to only use ultralytics standard preprocessing
- Remove method parameter since only one preprocessing approach is used
- Clean up orphaned comments and documentation
This removes ~150 lines of unused code while maintaining 100% functionality.
Single ultralytics preprocessing provides good accuracy at 640x640 resolution
for small UI elements like pokeballs and shiny icons.
Related todos: #remove-unused-multipass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add ClassificationManager singleton to handle class name mappings
- Load class names dynamically from training dataset.yaml (source of truth)
- Remove hardcoded 96-class mapping from YOLOInferenceEngine
- Add SnakeYAML dependency for YAML parsing
- Update all classNames references to use ClassificationManager
- Ensure consistency between model training data and runtime classification
Related todos: #create-classification-module
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace hardcoded NUM_DETECTIONS, NUM_CLASSES, NMS_OUTPUT_FEATURES_PER_DETECTION
with runtime extracted values from ONNX model session
- Add extractModelMetadata() method to dynamically determine model properties
- Update parseNMSOutput, matToTensorArray, and postprocessResults to use dynamic variables
- Fallback to constants if runtime extraction fails for safety
- Replace remaining magic numbers with named constants
Related todos: #extract-model-metadata
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created PGHLog utility with "PGH - " prefix for easy log filtering
- Enhanced MLResult with specific error types (MLErrorType enum)
- Updated MLInferenceEngine interface to use MLResult pattern
- Converted all Log.* calls to PGHLog.* in core components
- Added type-specific error recovery strategies with onErrorType()
- Improved error propagation and debugging capabilities
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced complex color format conversion (20 lines) with ensureBGRFormat() utility
- Simplified RGB conversion logic using ensureRGBFormat() utility
- Reduced preprocessOriginalStyle from 13 lines to 3 lines with safeResize()
- Added comprehensive preprocessing utilities for code reuse
- Improved maintainability and reduced code duplication
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Method Decomposition Improvements:
- Extract complex coordinate transformation logic from parseNMSOutput method
- Create TransformedCoordinates data class for type-safe coordinate handling
- Add transformCoordinates() method with clear parameter naming
- Reduce parseNMSOutput method complexity by 60+ lines
Code Quality Benefits:
- Separate coordinate transformation concerns from detection parsing
- Eliminate duplicate transformation logic across different modes
- Improve testability of coordinate transformation independently
- Better readability with focused, single-responsibility methods
Maintainability Impact:
- Coordinate transformation logic now in one place for easier debugging
- Clear separation between transformation logic and detection creation
- Type-safe coordinate handling with data class
- Foundation for unit testing coordinate transformations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Improvements:
- Create YOLOConfig data class with all inference settings consolidated
- Add CoordinateMode and PreprocessingTechnique enums for type safety
- Update YOLOInferenceEngine constructor to accept configurable settings
- Replace scattered constants with config usage in key methods
- Enable runtime configuration of model file, thresholds, and processing options
Maintainability Benefits:
- All YOLO settings in one place for easy adjustment
- Type-safe enums prevent configuration errors
- Default values maintain backward compatibility
- Cleaner separation between configuration and implementation
Performance Impact:
- Thread pool size now configurable via config.threadPoolSize
- Confidence and processing thresholds easily adjustable
- Foundation for A/B testing different configurations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add @UnsafeVariance annotation to fix 'out' type parameter usage in input position
- Ensures compilation succeeds with the new error handling infrastructure
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
High Priority Fixes:
- Fix thread pool management: Add shared preprocessingExecutor to prevent creating new thread pools per detection
- Add proper thread pool shutdown with grace period in cleanup() method
- Remove memory leak from repeated Executors.newFixedThreadPool() calls
Code Quality Infrastructure:
- Add MatUtils.kt with safe Mat resource management extension functions
- Add MLResult.kt with standardized error handling for ML operations
- Prepare foundation for systematic error handling improvements
Performance Impact:
- Eliminates thread pool creation overhead during inference
- Reduces memory pressure from abandoned thread pools
- Maintains all original ML detection functionality
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix DetectionController initialization crash by properly setting up dependency injection
- Update all function signatures to use new MLDetection type instead of legacy Detection
- Remove duplicate class mapping and getClassIdFromName helper method from ScreenCaptureService
- Update EnhancedOCR to work with new MLDetection and BoundingBox types
- Comment out legacy YOLOOnnxDetector references in MainActivity and DetectionController
- Exclude legacy YOLOOnnxDetector.kt from compilation (moved to .bak)
- Fix missing return statement in YOLOInferenceEngine.detectWithMat method
- Add build commands documentation to CLAUDE.md for future reference
- Ensure all preprocessing and detection functionality preserved from original
Architecture Changes:
- ScreenCaptureService now properly uses MLInferenceEngine interface
- DetectionController updated to use MLInferenceEngine instead of legacy detector
- All detection workflows now use unified MLDetection and BoundingBox types
- Maintained 100% backward compatibility of ML detection capabilities
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
ARCH-002: Extract ML Inference Engine
- Created MLInferenceEngine interface with async detection methods
- Implemented YOLOInferenceEngine preserving ALL YOLOOnnxDetector functionality:
* Complete 96-class mapping with exact original class names
* All preprocessing techniques (ultralytics, enhanced, sharpened, original)
* All coordinate transformation modes (HYBRID, LETTERBOX, DIRECT)
* Weighted NMS and cross-class NMS for semantically related classes
* Confidence mapping and mobile optimization
* Debug features (class filtering, confidence logging)
* Letterbox resize with proper aspect ratio preservation
* CLAHE contrast enhancement and sharpening filters
- Created ImagePreprocessor utility for reusable preprocessing operations
* Configurable preprocessing with letterboxing, normalization, color conversion
* Coordinate transformation utilities for model-to-image space conversion
* Support for different preprocessing configurations
- Updated ScreenCaptureService to use new MLInferenceEngine:
* Replaced YOLOOnnxDetector with MLInferenceEngine dependency injection
* Added class name to class ID mapping for compatibility
* Maintained all existing detection pipeline functionality
* Proper async/await integration with coroutines
- Applied preferred code style throughout:
* Opening braces on new lines for functions and statements
* snake_case for local variables to distinguish from members/parameters
* Consistent formatting matching project standards
- Removed obsolete YOLO implementations (YOLODetector, YOLOTFLiteDetector)
- Preserved all sophisticated ML features: TTA, multi-preprocessing, confidence mapping
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Applied user's preferred coding conventions:
- Braces on new line (opening { goes below function/statement)
- Local variables in snake_case for better distinction:
* display_metrics (instead of displayMetrics)
* window_manager (instead of windowManager)
* captured_image (instead of image)
Benefits:
- Improved readability at a glance
- Clear distinction between member variables, parameters, and locals
- Consistent style throughout the new architecture components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Created ScreenCaptureManager interface and ScreenCaptureManagerImpl to separate
screen capture concerns from ScreenCaptureService, improving architecture:
## New Files:
- ScreenCaptureManager.kt: Interface defining screen capture operations
- ScreenCaptureManagerImpl.kt: Implementation handling MediaProjection lifecycle
## Changes to ScreenCaptureService.kt:
- Remove direct MediaProjection/ImageReader/VirtualDisplay handling
- Use ScreenCaptureManager via dependency injection pattern
- Delegate screen capture operations to manager
- Get screen dimensions from manager instead of storing locally
- Proper manager lifecycle with release() in onDestroy()
## Benefits:
- Single Responsibility Principle: Service focuses on orchestration
- Testability: Screen capture logic can be unit tested in isolation
- Maintainability: Clear separation of concerns
- Reusability: Manager can be used by other components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add proper ocrExecutor lifecycle management in ScreenCaptureService.onDestroy()
- Use awaitTermination() with 5-second timeout before forcing shutdownNow()
- Handle InterruptedException with proper thread interrupt restoration
- Verified temporary executors in YOLOOnnxDetector already have proper cleanup
- Prevents thread pool resource leaks and ensures clean service shutdown
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove BENCHMARKING_MODE flag and detectionTimes list
- Remove printBenchmarkStats() and resetBenchmarkStats() functions
- Remove detailed benchmark logging from detection method
- Keep only essential timing log for normal operation
- Clean production code after performance testing complete
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
BENCHMARK RESULTS:
- Multi-processing: 2491.6ms average (baseline)
- Single-processing: 1800.5ms average (27.7% faster\!)
- Performance improvement: 691ms per detection
- Total time reduced from 49832ms to 36010ms
- Set ENABLE_MULTI_PREPROCESSING = false
- Eliminates thread pool overhead and context switching
- Exceeds expected 20-30% performance improvement target
- Mobile CPUs perform better with single-threaded preprocessing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add BENCHMARKING_MODE flag and detection timing collection
- Add printBenchmarkStats() and resetBenchmarkStats() functions
- Enhanced logging to track MULTI vs SINGLE preprocessing performance
- Automatic stats reporting every 10 detections
- Ready to benchmark current multi-processing performance
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add proper bitmap cleanup in ScreenCaptureService.processImage()
- Fix bitmap leaks in convertImageToMat() with try-finally blocks
- Ensure bitmap.recycle() called in all exception paths
- Add safe cleanup in EnhancedOCR.performBasicOCR()
- Wrap OCR bitmap operations with proper resource management
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create MatUtils.kt with safe resource management patterns
- Fix major Mat leak in ScreenCaptureService.kt image processing pipeline
- Fix Mat leaks in EnhancedOCR.kt enhanceImageForOCR() and upscaleImage()
- Add Mat.use() extension for automatic cleanup with try-finally
- Add useMats() utility for multi-Mat operations
- Add releaseSafely() for batch Mat cleanup with error handling
Critical stability fix: prevents native memory leaks that cause app crashes
during extended detection use. Mat objects now guaranteed to be released
even in exception paths.
Related: REFACTORING_TASKS.md CRITICAL-001
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Delete FloatingActionButtonUI.kt (580 lines) - unused Material 3 FAB
- Delete FloatingOrbUI.kt (270 lines) - unused basic orb implementation
- Delete FloatingComposeOverlay.kt (352 lines) - unused Compose overlay
- Delete FloatingUIActivity.kt (444 lines) - unused activity with dead code
- Remove FloatingUIActivity from AndroidManifest.xml
- Clean up unused imports and functions in MainActivity.kt
- Update comments in ScreenCaptureService.kt
Total cleanup: 1,646 lines of unused code removed
Active UI: EnhancedFloatingFAB.kt remains as the working implementation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Calculate actual menu height using measure() for precise bounds checking
- Add 32dp safety margin to account for navigation bar and system UI
- Automatically adjust menu Y position when it would extend off bottom
- Prevent menu from going off top of screen with maxOf(0, adjustedY)
- Add comprehensive debug logging for position calculations
This ensures the floating menu is always fully visible regardless of
FAB position, with the menu intelligently shifting upward when the
FAB is positioned near the bottom of the screen.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add automatic menu side detection based on FAB center position
- Menu appears on right when FAB is on left side of screen (and vice versa)
- Flip menu item layout order based on FAB position:
- Left side: [MiniFAB][Label] (mini FAB closest to main FAB)
- Right side: [Label][MiniFAB] (mini FAB closest to main FAB)
- Adjust container gravity and item margins for proper alignment
- Add debug logging for layout decisions
This creates a symmetrical UX where mini FABs are always closest
to the main FAB and labels extend outward, preventing off-screen
menu items regardless of FAB position.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace single window with separate WindowManager windows for FAB and menu
- Fix main FAB movement issue by using independent window positioning
- Calculate actual menu width instead of estimating for precise positioning
- Menu now appears to the left of FAB with proper 8dp spacing
- Remove obsolete updateRootLayout() function and auto-hide behavior
- Add debug logging for position calculations
The separate windows approach eliminates layout interference between
the main FAB and expandable menu, ensuring the FAB stays fixed while
the menu expands leftward as requested.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace broken FloatingComposeOverlay with EnhancedFloatingFAB
- True floating behavior using WindowManager overlay system
- Edge docking: automatic snap to screen edges within 50dp threshold
- Touch-through support: only FAB intercepts touches, rest passes to underlying apps
- Expandable menu with 5 detection options (DETECT, SHINY, POKEBALL, ALL, DEBUG)
- Material Design styling with circular backgrounds and proper elevation
- Haptic feedback with permission checking and graceful fallbacks
- Auto-hide menu after 3 seconds of inactivity
- Smooth animations: 300ms edge snapping, staggered menu expansion
- Added VIBRATE permission to AndroidManifest.xml
- Added Material Design Components dependency
Technical implementation:
- WindowManager overlay with WRAP_CONTENT sizing for precise touch handling
- ImageButton with custom GradientDrawable backgrounds for Material styling
- ValueAnimator for smooth edge snapping with AccelerateDecelerateInterpolator
- ObjectAnimator for menu item animations with staggered delays
- Safe vibration with runtime permission checks and exception handling
Addresses critical requirements from UI_MODERNIZATION_TASKS.md:
✅ Truly floating like CalcIV - not activity-based
✅ Edge docking with smooth animation
✅ Touch-through for underlying Pokemon GO interaction
✅ Professional Material 3 design
✅ No system UI interference
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
NEW REQUIREMENTS:
- Soft dock to screen edges (snap when dragged within 50px of edge)
- Touch-through for underlying apps (user must interact with Pokemon GO)
- Only FAB intercepts touches, everything else passes to underlying app
TECHNICAL IMPLICATIONS:
- Activity approach now problematic (captures touches in window bounds)
- WindowManager + Views approach now RECOMMENDED (precise touch control)
- Window must be sized exactly to FAB, not fullscreen
- FLAG_NOT_TOUCH_MODAL critical for touch pass-through
Updated recommendation: Option B (Enhanced WindowManager + Material Views)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Document all approaches tried: Activity-based, ComposeView overlay, lifecycle solutions
- Detail specific issues encountered: positioning, transparency, lifecycle crashes
- Analyze three next-step options with pros/cons
- Record user requirements and current git state for easy resume
- Provide technical deep dive of what worked vs what failed
Ready for next conversation to pick up from Option A, B, or C.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove complex OverlayLifecycleOwner implementation
- Remove ViewTreeLifecycleOwner references (not available in this API level)
- Use basic ComposeView without explicit lifecycle management
- Let ComposeView handle its own lifecycle in overlay context
Some Android versions support ComposeView in overlay without explicit lifecycle.
If this still fails, we'll fall back to View-based FAB implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com)
- Create OverlayLifecycleOwner implementing LifecycleOwner and SavedStateRegistryOwner
- Set ViewTreeLifecycleOwner and ViewTreeSavedStateRegistryOwner on ComposeView
- Manage lifecycle states (onCreate, onStart, onResume, onDestroy) for overlay
- Fixes: ViewTreeLifecycleOwner not found exception when using ComposeView in overlay
Error: java.lang.IllegalStateException: ViewTreeLifecycleOwner not found
Solution: Provide custom lifecycle owner for overlay context
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename MenuFABItem to OverlayMenuFABItem in FloatingComposeOverlay
- Fixes overload resolution ambiguity between two files
- Both FloatingUIActivity and FloatingComposeOverlay had same function name
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Create FloatingComposeOverlay using WindowManager for true system overlay
- Replace Activity-based approach with proper overlay window
- Add unrestricted drag support with WindowManager position updates
- Use transparent background to show underlying apps
- Integrate overlay directly into ScreenCaptureService
- Remove FloatingUIActivity dependency from MainActivity
Benefits:
- True floating behavior over all apps
- Unrestricted dragging anywhere on screen
- Transparent background shows underlying content
- Proper system overlay like CalcIV
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move setupTransparentOverlay() from onCreate to onResume to avoid null window
- Add try-catch block to handle WindowInsetsController access errors
- Add null-safety checks for window operations
- Prevent crash when accessing insetsController before window is ready
Fixes: NullPointerException when accessing WindowInsetsController
Error: 'getWindowInsetsController()' on a null object reference
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Make FAB truly draggable with detectDragGestures
- Add screen bounds checking to keep FAB visible
- Hide navigation bar and status bar for immersive overlay experience
- Support both Android R+ (WindowInsetsController) and legacy system UI flags
- FAB now floats anywhere on screen and can be repositioned by dragging
Fixes: Navigation bar and status bar no longer show during capture mode
Fixes: FAB is now truly floating and user can position it anywhere
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>