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
137 stars 124 forks source link

Not receiving msg in real device #164

Open imsidz opened 1 year ago

imsidz commented 1 year ago

Everything is working fine in emulator but after build in release version installing any device its not receiving msg

erndiggy commented 1 year ago

Make sure to add appropriate permissions to the manifest file.

msaadev commented 1 year ago

I have this error too

`

<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS"/>`

I have all permissions and receiver

jktan-arrivo commented 1 year ago

anyone find the solution ?

virtualars commented 1 year ago

yes, with some devices it works, with others not, even samsung, not just xiaomi

msaadev commented 1 year ago

I write my codes in native side when message comes

jktan-arrivo commented 1 year ago

@msaadev can you give us some example ?

MohammadShateri commented 1 year ago

This problem is very annoying. The only problem is not working in the background. Following all the points, but still there is this problem. There is no solution for this problem? This plugin is very useful but this is the problem I'm facing, I still haven't found a tool that supports in the background when sms is found.

This plugin is no longer active, do you know a good alternative for it? Or a solution that fixes the problem?

virtualars commented 1 year ago

I had to change plugins, I found a very similar one, it doesn't ask for permissions automatically, so you need to install permission handler, but it works fine

MohammadShateri commented 1 year ago

@virtualars Does it really work on a real device? If it works on a real device, it will be great. Thank you for introducing this package to me to solve this problem. 🙏🌹

virtualars commented 1 year ago

@virtualars Does it really work on a real device? If it works on a real device, it will be great. Thank you for introducing this package to me to solve this problem. 🙏🌹

https://pub.dev/packages/background_sms

jktan-arrivo commented 1 year ago

@virtualars Does it really work on a real device? If it works on a real device, it will be great. Thank you for introducing this package to me to solve this problem. 🙏🌹

https://pub.dev/packages/background_sms

thanks. hope you can share us some sample code for using this package

rahulmaindargi commented 1 year ago

I am trying solution mentioned in https://github.com/shounakmulay/Telephony/issues/165

telephony:
  git:
    url: https://github.com/definev/Telephony.git
    ref: develop

change is adding @pragma('vm:entry-point') to telephony.dart method

Not sure if and when it will merged to original package.