S4 ‐ Connectivity strategy(ies) - S3-G31-Kotlin-QueueHub/mobile-app-android GitHub Wiki
Connectivity Strategies
QueueHub ensures a seamless user experience even in offline scenarios through robust connectivity strategies. Here's how we handle various situations to maintain functionality and keep users informed:
1. Connection Loss Notifications
- Informative Alerts: When connectivity is lost, users receive a clear, informative message instead of a generic error. This prevents confusion and avoids the "Non-informative message" antipattern.
- Authentication Alerts: During login or sign-up attempts, users are notified if connectivity is unavailable, ensuring transparency and guiding their next steps.
2. Data Handling and Caching
- Offline Data Access: Key content such as places, queues, and recommended locations is stored locally in the cache. This ensures that users can still view relevant information even without an internet connection.
- Local Storage Utilization: Critical data, including user profiles and detailed place information, is saved locally. This allows continued access to essential features and content during offline periods.
3. Authentication and Profile Management
- Profile Screen: User profile information is retrieved from local storage when offline, ensuring consistent access to personal details.
4. Recommended and Common Places
- Cached Recommendations: The last set of recommended places is stored locally and displayed when offline, maintaining a personalized user experience even without internet access.
- Frequent Places: Commonly visited locations are saved in the cache, providing quick access to familiar establishments during connectivity loss.
5. Queue Management
- Turn State Preservation: The app saves the user’s current position in the queue and notifies them if the connection is lost. Once connectivity is restored, the queue state is updated automatically.
- Offline Turn Management: Users are informed of their turn status and encouraged to reconnect. Alternatively, they can visit the establishment directly to check their position if they prefer.
6. Detailed Place Information
- Stored Data Display: Detailed information about places is cached when online and displayed offline, ensuring users can always access essential details without needing an active connection.
Key Benefits:
- Enhanced User Experience: Users remain informed and empowered, even when offline.
- Reliability and Transparency: Clear messaging and local storage maintain trust and prevent frustration.
- Continuous Functionality: Essential features like queue tracking and recommendations work seamlessly, regardless of connectivity status.
These strategies ensure that QueueHub provides a consistent, reliable, and user-friendly experience in both online and offline scenarios, enhancing customer satisfaction and trust.