Comments (11)
I am facing the same problem , IncomingCall is working perfectly when my app is in foreground. But it doesn't want to trigger from the background. I am using firebase to send notification and i am reciving all data while in background but IncomingCall wont display.
messaging().setBackgroundMessageHandler(async remoteMessage => { console.log('bg message', remoteMessage); console.log('state'+ AppState.currentState); IncomingCall.display('5446465416', 'marko','https://image.shutterstock.com/image-photo/white-transparent-leaf-on-mirror-260nw-1029171697.jpg'); });
any solution for that ?
thanks in advance
Update :
I just tested it on Android 8 and everything works perfectly. But when i start it on android 9 or 10 nothing happens
from react-native-incoming-call.
I just tested it on Android 8 and everything works perfectly. But when I start it on android 9 or 10 nothing happens
In android > 9 you had to set autostart and display pop-up window permissions manually to make it works in background.
I'm working on an example project and invest more on other issues this weekend.
from react-native-incoming-call.
I just tested it on Android 8 and everything works perfectly. But when I start it on android 9 or 10 nothing happens
In android > 9 you had to set autostart and display pop-up window permissions manually to make it works in background.
I'm working on an example project and invest more on other issues this weekend.
@bkdev98 I tested it on redmi Android 8 phone and it's not working in background.
from react-native-incoming-call.
I am facing the same problem , IncomingCall is working perfectly when my app is in foreground. But it doesn't want to trigger from the background. I am using firebase to send notification and i am reciving all data while in background but IncomingCall wont display.
messaging().setBackgroundMessageHandler(async remoteMessage => { console.log('bg message', remoteMessage); console.log('state'+ AppState.currentState); IncomingCall.display('5446465416', 'marko','https://image.shutterstock.com/image-photo/white-transparent-leaf-on-mirror-260nw-1029171697.jpg'); });
any solution for that ?
thanks in advance
Update :
I just tested it on Android 8 and everything works perfectly. But when i start it on android 9 or 10 nothing happens
@@maloni991 I used the react-native-invoke-apphttps://www.npmjs.com/package/react-native-invoke-app to open app from background and killed state. From firebase background message listeners I am calling invokeApp method with data argument. And from "appInvoked" Listener calling IncomingCall.display method. It's working fine on Android 8,9 and 10.
from react-native-incoming-call.
@bkdev98 any update on background issue?
from react-native-incoming-call.
@anjandaffo did you get the solution for this?
from react-native-incoming-call.
@fachreza73 I fixed the issue with using another package https://www.npmjs.com/package/react-native-invoke-app together. From firebase background message listeners I am calling invokeApp method with data argument. And from "appInvoked" Listener calling IncomingCall.display method. It's working fine on Android 8,9 and 10.
from react-native-incoming-call.
i just follow the example project and its working. you need to import function that trigger the IncomingCall.display
and call the function when remote message coming (see index.js and App.js in example folder).
thanks for the example @bkdev98
from react-native-incoming-call.
i only experience this in release build..
UPDATE: I have two xiaomi phones.. same model and android version but the other one works even the app is in the background and the other one isn't..
from react-native-incoming-call.
i just follow the example project and its working. you need to import function that trigger the
IncomingCall.display
and call the function when remote message coming (see index.js and App.js in example folder).thanks for the example @bkdev98
Update:
i just notice that my emulator using Android 9. then when i try to assemble build with some devices. the result is :
- Xiaomi with Android 10, incoming call only work in foreground state
- Samsung with Android 9, incoming call work for all state (foreground, background, inactive)
- Oppo with Android 8, incoming call only work in foreground and background state
from react-native-incoming-call.
I just released version 2 of the library which believed fixed this bug so I gonna close it here. Feel free to reopen or create new issue if you still got this issue.
from react-native-incoming-call.
Related Issues (20)
- Allow customize decline and video button HOT 4
- Allow customize fallback avatar image
- How to open MainActivity instead of UnlockScreenActivity HOT 2
- Fix Invoke App From Background Android 10 HOT 10
- Call screen keeps running until any action is taken HOT 3
- Background Message Handler method not called when incomingcall display HOT 3
- Ringtone only in the first call HOT 2
- IncomingCall.display shows nothing when app is in background/killed HOT 1
- Your new version crashed HOT 2
- Access in Native Code HOT 1
- IncomingCall.display shows nothing when app is in background/killed HOT 1
- Incoming.dismiss() is not defined
- Ringtone only in the first call HOT 1
- Incompatible version HOT 1
- Publish 2.0.4 to npm HOT 3
- use fullscreenpendingintent for avoid drawing permission
- how to dismiss INCOMMING CALL???? HOT 4
- Sometimes call doesn't come, when app is killed (Android)
- Answer call not trigreed on google pixel android version 11.
- How do I make incoming calls ring on both speakers and headphones?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-incoming-call.