react-native-webrtc / react-native-callkit

#deprecated iOS 10 new CallKit framework for React Native
ISC License
122 stars 67 forks source link

Question / Handling permissions #37

Closed aarkalyk closed 5 years ago

aarkalyk commented 6 years ago

Hey, @ianlin ! I wanted to ask about handling mic/camera permissions when user opens the app for the first time. The tricky part for me is user receiving a call for the first time when app is in background/killed mode. How do you handle such cases? What are the best practices? Thanks in advance!

ghost commented 5 years ago

Hello - were you able to solve this issue? I have the same problem.

aarkalyk commented 5 years ago

@Praxey We've solved it the same way as whatsapp does. When user receives a call for the first time, instead of using callkit we use regular push notifications. Once user taps on a notification and opens the app, we ask for permissions. If permissions allowed proceed with a call, otherwise reject a call and next time user receives a call reject automatically and show an alert saying that permissions are required.

ghost commented 5 years ago

Thanks!