Skip to content

stopSmsHandling() Not Stopping SMS Listening #47

@hasangonen91

Description

@hasangonen91

I am using startSmsHandling to listen for incoming SMS messages, and I want to stop listening when the component unmounts. However, calling stopSmsHandling() does not seem to stop the listener.

Even after calling stopSmsHandling() in the cleanup function, SMS reading continues when navigating within the app and receiving new messages.

Here is my cleanup function:

return () => {
  try {
    stopSmsHandling();
    console.log('SMS listening stopped.');
  } catch (error) {
    console.error('Error removing SMS listener:', error);
  }
};

How can I properly stop the SMS listener? Is there a known issue with stopSmsHandling()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions