Skip to content
Draft
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
465 changes: 465 additions & 0 deletions docs/ar_marker_video_overlay.md

Large diffs are not rendered by default.

269 changes: 269 additions & 0 deletions docs/qa_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
# AR Marker Video Overlay - QA Checklist

## 1. Initial Setup and Configuration

### Environment Setup
- [ ] Flutter SDK version >=3.0.0 is installed
- [ ] ARCore compatible Android device is available
- [ ] Camera permissions are granted
- [ ] App has proper ARCore support in Android manifest

### Dependencies
- [ ] All required dependencies are installed:
- [ ] ar_flutter_plugin: ^0.7.3
- [ ] video_player: ^2.8.1
- [ ] vector_math: ^2.1.4
- [ ] dartz: ^0.10.1
- [ ] collection: ^1.18.0

### Configuration
- [ ] Backend API is accessible
- [ ] Marker configuration endpoint returns valid data
- [ ] Video and image assets are properly hosted
- [ ] Cache management is working

## 2. Marker Detection and Tracking

### Basic Detection
- [ ] AR session initializes successfully
- [ ] Camera feed is displayed correctly
- [ ] Markers are detected when visible
- [ ] Detection confidence is calculated correctly

### Tracking Performance
- [ ] Marker tracking is stable under good lighting
- [ ] Tracking maintains position when device moves slowly
- [ ] Tracking recovers quickly after temporary occlusion
- [ ] Multiple markers can be tracked simultaneously

### Edge Cases
- [ ] Tracking handles partial marker visibility
- [ ] System gracefully handles marker loss
- [ ] Tracking works with different marker sizes
- [ ] Tracking handles reflective surfaces

## 3. Video Overlay Rendering

### Video Playback
- [ ] Videos load and play when markers are detected
- [ ] Videos pause/resume based on marker visibility
- [ ] Video looping works correctly
- [ ] Video volume controls function properly

### Overlay Positioning
- [ ] Video overlays align correctly with detected markers
- [ ] Overlay size scales appropriately with distance
- [ ] Overlay positioning remains stable during movement
- [ ] Multiple video overlays render correctly

### Video Formats
- [ ] MP4 videos play correctly
- [ ] WebM videos play correctly
- [ ] Different video resolutions are handled
- [ ] Various aspect ratios display properly

## 4. Pose Smoothing and Stability

### Smoothing Algorithm
- [ ] Pose interpolation reduces jitter
- [ ] Movement feels natural and responsive
- [ ] Smoothing factor can be adjusted
- [ ] No noticeable lag in tracking response

### Stability Testing
- [ ] Overlay remains stable during device rotation
- [ ] Position is maintained during lighting changes
- [ ] System handles rapid movement without losing tracking
- [ ] Confidence thresholds work as expected

## 5. Performance and Resource Management

### Memory Usage
- [ ] Memory usage remains stable during extended use
- [ ] Video caching doesn't cause memory leaks
- [ ] Pose history is properly managed
- [ ] Resources are released when leaving AR view

### CPU Performance
- [ ] Frame rate remains above 30 FPS
- [ ] CPU usage is reasonable during tracking
- [ ] Video decoding doesn't impact tracking performance
- [ ] Background processing doesn't affect UI responsiveness

### Battery Usage
- [ ] Battery consumption is acceptable
- [ ] Camera and ARCore optimizations are in place
- [ ] Video playback is optimized for mobile devices

## 6. Error Handling and Edge Cases

### Network Issues
- [ ] App handles network connectivity loss gracefully
- [ ] Video download failures are handled properly
- [ ] Marker configuration sync works with intermittent connectivity
- [ ] Offline mode functions with cached data

### ARCore Issues
- [ ] App handles ARCore installation requirements
- [ ] Incompatible devices show appropriate messages
- [ ] ARCore initialization failures are handled
- [ ] Session interruptions are recovered gracefully

### Video Issues
- [ ] Corrupted video files don't crash the app
- [ ] Missing video URLs are handled properly
- [ ] Video codec incompatibility is handled
- [ ] Large video files don't cause timeouts

## 7. User Experience

### Interface Design
- [ ] Status indicators are clear and informative
- [ ] Loading states provide good feedback
- [ ] Error messages are user-friendly
- [ ] Settings are accessible and intuitive

### Interaction Design
- [ ] AR view navigation is intuitive
- [ ] Video controls (if any) are responsive
- [ ] Settings changes apply immediately
- [ ] Help/information is available

### Accessibility
- [ ] Color contrast meets accessibility standards
- [ ] Text sizes are readable
- [ ] Alternative text for important elements
- [ ] Voice control compatibility (if applicable)

## 8. Environmental Testing

### Lighting Conditions
- [ ] Bright outdoor lighting works well
- [ ] Indoor lighting conditions are handled
- [ ] Low light environments function correctly
- [ ] Mixed lighting scenarios work
- [ ] Backlighting situations are handled

### Marker Conditions
- [ ] Printed paper markers work
- [ ] Digital screen markers work
- [ ] Slightly damaged markers still track
- [ ] Markers at various angles work
- [ ] Markers at different distances work

### Physical Environment
- [ ] Tracking works on various surfaces
- [ ] Reflective surfaces don't interfere
- [ ] Textured surfaces improve tracking
- [ ] Moving backgrounds are handled

## 9. Device Compatibility

### Android Devices
- [ ] Tested on multiple Android versions (API 24+)
- [ ] Works on devices with different camera configurations
- [ ] Performance is acceptable on mid-range devices
- [ ] High-end devices show improved performance

### Screen Sizes
- [ ] UI adapts to different screen sizes
- [ ] AR view works on portrait and landscape
- [ ] Tablet layouts are optimized
- [ ] Notch/cutout areas are handled

## 10. Integration Testing

### Backend Integration
- [ ] Marker configuration loads from backend
- [ ] Image and video assets download correctly
- [ ] API errors are handled gracefully
- [ ] Authentication works if required

### System Integration
- [ ] App transitions to/from AR view smoothly
- [ ] Background operation works correctly
- [ ] System notifications don't interfere
- [ ] Other apps don't cause conflicts

## 11. Automated Testing

### Unit Tests
- [ ] Domain entities test coverage >90%
- [ ] Repository implementations have tests
- [ ] Use case logic is tested
- [ ] Edge cases are covered

### Widget Tests
- [ ] UI components render correctly
- [ ] User interactions work as expected
- [ ] State changes are handled properly
- [ ] Error states are displayed correctly

### Integration Tests
- [ ] End-to-end workflows work
- [ ] Data flow between layers is correct
- [ ] Error propagation works
- [ ] Performance benchmarks are met

## 12. Documentation and Deployment

### Documentation
- [ ] API documentation is complete
- [ ] Setup instructions are clear
- [ ] Troubleshooting guide is provided
- [ ] Code comments are adequate

### Deployment
- [ ] Build process works without errors
- [ ] App signing is configured
- [ ] Store listing is complete
- [ ] Version management is in place

## Test Scenarios

### Scenario 1: Basic Marker Detection
1. Launch the app
2. Navigate to AR marker video page
3. Point camera at a known marker
4. Verify marker is detected
5. Verify video overlay appears
6. Move device and verify overlay follows marker

### Scenario 2: Multiple Markers
1. Set up multiple markers in view
2. Verify all markers are detected
3. Verify corresponding videos play
4. Occlude one marker and verify its video pauses
5. Reveal marker and verify video resumes

### Scenario 3: Performance Stress Test
1. Run AR session for 30+ minutes
2. Monitor memory usage
3. Track frame rate stability
4. Test with multiple simultaneous markers
5. Verify no performance degradation

### Scenario 4: Network Resilience
1. Start app with good connectivity
2. Load marker configuration
3. Disconnect network during operation
4. Verify cached content continues to work
5. Reconnect network and verify sync resumes

## Acceptance Criteria

- All markers in test dataset are detected with >70% confidence
- Video overlays appear within 500ms of marker detection
- Frame rate maintains 30+ FPS during normal operation
- Memory usage doesn't exceed 200MB during extended use
- App handles all error conditions gracefully
- User experience is smooth and intuitive

## Final Sign-off

- [ ] QA Lead approval
- [ ] Product Manager approval
- [ ] Technical Lead approval
- [ ] Performance benchmarks met
- [ ] Security review completed
- [ ] Accessibility testing completed
50 changes: 50 additions & 0 deletions lib/core/di/injection_container.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
import 'package:get_it/get_it.dart';
import 'package:injectable/injectable.dart';
import 'package:dio/dio.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';

import 'injection_container.config.dart';

// Domain imports
import '../../domain/repositories/ar_repositories.dart';

// Data imports
import '../../data/repositories/ar_marker_repository_impl.dart';
import '../../data/repositories/ar_tracking_repository_impl.dart';
import '../../data/repositories/video_overlay_repository_impl.dart';
import '../../data/repositories/pose_smoothing_repository_impl.dart';

// AR imports
import 'package:ar_flutter_plugin/managers/ar_anchor_manager.dart';
import 'package:ar_flutter_plugin/managers/ar_location_manager.dart';
import 'package:ar_flutter_plugin/managers/ar_object_manager.dart';
import 'package:ar_flutter_plugin/managers/ar_session_manager.dart';

final getIt = GetIt.instance;

@injectableInit
Expand All @@ -21,4 +37,38 @@ abstract class RegisterModule {
sendTimeout: const Duration(seconds: 30),
),
);

@singleton
DefaultCacheManager get cacheManager => DefaultCacheManager();

// AR Managers (these will be initialized by the AR view)
@lazySingleton
ARSessionManager get arSessionManager => ARSessionManager();

@lazySingleton
ARObjectManager get arObjectManager => ARObjectManager();

@lazySingleton
ARAnchorManager get arAnchorManager => ARAnchorManager();

@lazySingleton
ARLocationManager get arLocationManager => ARLocationManager();

// Repository implementations
@lazySingleton
ARMarkerRepository get arMarkerRepository => ARMarkerRepositoryImpl(getIt<Dio>(), getIt<DefaultCacheManager>());

@lazySingleton
ARTrackingRepository get arTrackingRepository => ARTrackingRepositoryImpl(
getIt<ARSessionManager>(),
getIt<ARObjectManager>(),
getIt<ARAnchorManager>(),
getIt<ARLocationManager>(),
);

@lazySingleton
VideoOverlayRepository get videoOverlayRepository => VideoOverlayRepositoryImpl();

@lazySingleton
PoseSmoothingRepository get poseSmoothingRepository => PoseSmoothingRepositoryImpl();
}
Loading
Loading