react-native-incoming-call icon indicating copy to clipboard operation
react-native-incoming-call copied to clipboard

Fix Invoke App From Background Android 10

Open naufanituharish opened this issue 5 years ago • 10 comments

Hello there,, thanks for the library,, it working awesome for incoming call screen,. I found solution for your problems, to invoke incoming call screen from locked screen in android 10, you could use full screen intent, i use it with voximplant library and it works with locked screen and killed state app, You can follow this: https://github.com/voximplant/android-demos/tree/master/audiocall and using the notificationhelper.java in this link: https://github.com/voximplant/android-demos/blob/master/audiocall/src/main/java/com/voximplant/demos/audiocall/utils/NotificationHelper.java And also use foreground service check in those repo,. Since I'm not android expert and new in RN so I could not make PR for this case,.

Hope this information can help you,.

Regards, Naufan harish

naufanituharish avatar Aug 25 '20 16:08 naufanituharish

@naufanituharish Could you please show me your code?

kimho avatar Aug 27 '20 18:08 kimho

Hi @naufanituharish, I try using your fork repo and get an exception ForegroundCheck is not initialized. Did you add additional code in your project?

bkdev98 avatar Nov 13 '20 15:11 bkdev98

I see in voximplant code call ForegroundCheck.init(this) but I'm not sure where to put it yet 😅

bkdev98 avatar Nov 13 '20 15:11 bkdev98

it's working you need to get permission or overlay

add this pkg also to get overlay permission https://www.npmjs.com/package/rn-android-overlay-permission

Bilal112 avatar Nov 17 '20 09:11 Bilal112

Yes I'm also using it. But actually, some Xiaomi/Oppo devices need additional "Display pop-up windows while running in the background" permission to make it work. So I'm finding some replacement solutions.

Here for detail https://stackoverflow.com/questions/59645936/displaying-popup-windows-while-running-in-the-background

bkdev98 avatar Nov 17 '20 11:11 bkdev98

I also using the Xiaomi set and its working

Bilal112 avatar Nov 18 '20 11:11 Bilal112

Hi @naufanituharish, I try using your fork repo and get an exception ForegroundCheck is not initialized. Did you add additional code in your project?

Hi @bkdev98 sorry for very late reply currently I'm working on other project, have you solved it?? if not, give me a few days to review my code,. because long time not touch my previous work. need to know the flow,. 😅😅

naufanituharish avatar Dec 17 '20 09:12 naufanituharish

Yeah I think I'm fine with the rn-android-overlay-permission solution for now 😄

bkdev98 avatar Dec 17 '20 09:12 bkdev98

@bkdev98 @Bilal112 I am using rn-android-overlay-permission , its working fine when app is in background state, Not working when app is quit or killed. any solution when app is in killed or quit state?

AliSaeed090 avatar Dec 13 '21 22:12 AliSaeed090

we need provide autostart permission first, this lib does not

fukemy avatar Nov 21 '22 15:11 fukemy