shounakmulay / Telephony

Flutter plugin for telephony features like query device sms directory, listen for incoming messages, retrieve various network parameters, etc.
https://telephony.shounakmulay.dev
MIT License
138 stars 126 forks source link

"Reply already submitted" Error in combination with other location plugin #118

Closed Jellepepe closed 2 years ago

Jellepepe commented 2 years ago

As noted in the closed issue #79 , (as well as here: flutter/flutter#81546 ) a fatal error may arise when a different plugin is requesting a relevant permission on android.

This is caused by a small bug in onRequestPermissionsResult inside SmsMethodCallHandler.kt

The function should only call result.success or result.error if the telephony plugin was the initiator of the permissions request. permissionsController.isRequestingPermission is already available, so this is a very easy fix.

I will attach a pull request.

github-actions[bot] commented 2 years ago

Issue marked stale due to no activity.