sodipto / flutter-phone-state-background

MIT License
5 stars 7 forks source link

Recover phone number #6

Open mmgunes opened 1 year ago

mmgunes commented 1 year ago

Thank you for this package. How can I retrieve the incoming caller number while the phone is ringing? I want to access the phone number and display it on the screen.

sodipto commented 1 year ago

image

Gliting29 commented 1 year ago

I want to store the phone number in observable variable and show a overlay card whenever the user gets the call, is there any possibility to trigger custom widget with phone number when we get call using phoneStateBackgroundCallbackHandler

What changes must be done to detect number even when the app is removed from the ram ,right now its not able to detect the phone number when we close or remove the ram from memory?

sodipto commented 1 year ago

@Gliting29 Inside CallBackhandler no way to trigger custom widget. Because this separtae isolate function.

Already detetect phone number when app remove from ram. You read read.md file example file carefully.

Thank you.

Gliting29 commented 1 year ago

https://github.com/sodipto/flutter-phone-state-background/tree/main/example I was testing this example application in my emulator , so after all the permission are given , I am running it on physical device, the phone number gets logged when the app is in recent apps or its opened. After the app is removed from the RAM, the log tells connection lost to device and phone number is not detected. Are there any extra permissions required to run in background or just the setup which is mentioned in readme file is enough?

sodipto commented 1 year ago

No extra permission needed.

mmgunes commented 1 year ago
Screenshot at Jun 09 14-15-33

I want to access the phone number while the PHONE_RINGING event is ongoing. Then I want to display it on the screen

mr-srini commented 1 year ago

Is it possible to trigger the call when the app is in terminated state?