Closed arkanmgerges closed 3 years ago
Also my intention is to send sms from a background (when my app is not active), my use case is to receive push notification from firebase, then in the background I want to send sms
I tried a similar setup to send SMS within firebase messaging background handler and got error
MissingPluginException (MissingPluginException(No implementation found for method sendSms on channel plugins.shounakmulay.com/foreground_sms_channel))
flutter 2.0.4
firebase_messaging 9.1.1
telephony 0.1.2
Other plugins like shared preference work fine in firebase background handler except for this one.
I think this PR broke the expected behavior https://github.com/shounakmulay/Telephony/commit/29ffc3381c2b576a9c502f331cf13fc6be4e7565#diff-d8470fb64214119fb5a3045932e214b0be49e6852ef472b778f1e1334873d789R35
I guess the reason for this PR is to allow the incoming sms handler to calls telephony's methods but it made the foreground channel unavailable for another plugin usage.
In my case, and because I needed to only send sms from (foreground and background), I've created a plugin on my local machine that does this (only on android), and I've tested it with FCM background function (from flutter), and it worked. Maybe someone will make some fixes for the Telephony plugin.
I've got the same error "No implementation found for method sendSms on channel plugins.shounakmulay.com/foreground_sms_channel". Im using Android Alarm Manager to trigger it in the background but unable for it to get working.
Checkout version v0.1.3
Hi sir, Thank you for providing this repo. I observed in the file telephony.dart the following on lines 81-84:
Is this ok to have the same
_FOREGROUND_CHANNEL
for both the foreground and background?I was trying to send sms from the background but it is not working. It is only working from foreground,
Thank you sir, Arkan