Question
I'm working with the HelloAccessory example program (Provider on Android, Consumer on Tizen). While the initial connection works as expected, I'm facing an issue when the watch disconnects from the phone (for example, when walking away from the phone).
After disconnection, the connection never recovers automatically. While the watch remains connected, the HelloAccessory example stops functioning and displays "Device Not Reachable" on the watch side. The only way to restore functionality is to uninstall and reinstall the HelloAccessory Provider service on Android.
I'm wondering if I'm missing a reconnect call on the Android side. My environment:
- Tizen 2.3.2.3 on Gear S3
- Android 5.0 on Samsung S4
- Software version: R760XXU2BQC5
Answer
Problem Understanding
The issue occurs when the Bluetooth connection between the Gear device and Android phone is interrupted. While the physical connection re-establishes, the HelloAccessory service fails to recover automatically.
Solution Methods
-
Alternative Implementation:
- Consider using the SAMessage example instead, which has been reported to work reliably after Bluetooth reconnection.
- The HelloMessage sample has been confirmed to work as expected in similar scenarios.
-
Connection Management:
- Implement proper connection state monitoring and automatic reconnection logic in your application.
- Ensure both the Android provider and Tizen consumer handle connection state changes appropriately.
-
Version Verification:
- Verify compatibility between your Tizen and Android versions.
- Test with updated versions if possible, as some connection issues may be version-specific.
Additional Tips
- When implementing Bluetooth communication between Tizen and Android devices, always include proper error handling and connection state monitoring.
- Consider testing with different versions of the Tizen OS and Android to identify any version-specific issues.
- The SAMessage implementation might be more reliable for your use case than the HelloAccessory example.