Skip to content

🐛 Android Crash on Second Connection After App Relaunch (monitorCharacteristicForDevice) #1332

@rrubankumar-ctrl

Description

@rrubankumar-ctrl

Prerequisites

  • I checked the documentation and FAQ without finding a solution
  • I checked to make sure that this issue has not already been filed

Expected Behavior

The application crashes on Android when connecting to a BLE device for the second time after closing and reopening the app. The crash occurs when navigating to the reading screen where monitorCharacteristicForDevice() is used.

Current Behavior

This seems related to a known issue where the app crashes instead of handling disconnection properly.

Library version

3.5.0

Device

all devices

Environment info

The application crashes on Android when connecting to a BLE device for the second time after closing and reopening the app. The crash occurs when navigating to the reading screen where monitorCharacteristicForDevice() is used.

Steps to reproduce

  1. …Install and open the application on an Android device.

Scan and connect to a BLE peripheral device.

Navigate to the reading/data screen where monitorCharacteristicForDevice() is started.

Verify that data is being received correctly.

Close or kill the application from recent apps (without manually disconnecting the BLE device).

Reopen the application.

Connect to the same BLE device again.

Navigate to the reading/data screen again.

Formatted code sample or link to a repository

nil

Relevant log output

nil

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions