GithubHelp home page GithubHelp logo

Comments (11)

maloni991 avatar maloni991 commented on May 20, 2024

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.

bkdev98 avatar bkdev98 commented on May 20, 2024

@maloni991

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.

anjandaffo avatar anjandaffo commented on May 20, 2024

@maloni991

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.

anjandaffo avatar anjandaffo commented on May 20, 2024

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.

anjandaffo avatar anjandaffo commented on May 20, 2024

@bkdev98 any update on background issue?

from react-native-incoming-call.

fachrezamuslim avatar fachrezamuslim commented on May 20, 2024

@anjandaffo did you get the solution for this?

from react-native-incoming-call.

anjandaffo avatar anjandaffo commented on May 20, 2024

@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.

fachrezamuslim avatar fachrezamuslim commented on May 20, 2024

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.

 avatar commented on May 20, 2024

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.

fachrezamuslim avatar fachrezamuslim commented on May 20, 2024

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 :

  1. Xiaomi with Android 10, incoming call only work in foreground state
  2. Samsung with Android 9, incoming call work for all state (foreground, background, inactive)
  3. Oppo with Android 8, incoming call only work in foreground and background state

from react-native-incoming-call.

bkdev98 avatar bkdev98 commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.