Open wilmxre opened 1 year ago
I am facing the same issue in one plus, please let me know if you solve this.
callkeep uses telecom manager to show the incoming calls and for that it needs to register a phone account. some devices are just not capable for that, in my case i had the config_voice_capable
flag false, so the registration is not possible. i made a workaround for devices that don't have phone accounts, but these devices could not wake up from killed state with this implementaton, it only works in foreground and background state.
I am using messaging().setBackgroundMessageHandler() to wake up my app @react-native-firebase/messaging
I fixed the issue refer https://github.com/react-native-webrtc/react-native-callkeep/tree/master/example
Check all the permission from AndroidMnifest.xml and then call the function
const RNCall = async() => {
const options = {
ios: {
appName: 'My app name',
},
android: {
alertTitle: 'Permissions required',
alertDescription: 'This application needs to access your phone accounts',
cancelButton: 'Cancel',
okButton: 'ok',
imageName: 'phone_account_icon',
additionalPermissions: [PermissionsAndroid.PERMISSIONS.RECORD_AUDIO],
// Required to get audio in background when using Android 11
foregroundService: {
channelId: 'com.company.my',
channelName: 'Foreground service for my app',
notificationTitle: 'My app is running on background',
notificationIcon: 'Path to the resource icon of the notification',
},
}
};
const result = await RNCallKeep.setup(options).then(accepted => {
console.log("accepted--->", accepted)
});
const callUUID = '1234567890'; // a unique identifier for the call
const handle = 'John Doe'; // the caller's name or phone number
const localizedCallerName = 'John Doe'; // the localized caller name to display in the notification
const handleType = 'number'; // the type of handle (e.g. 'generic', 'number', 'email', etc.)
const hasVideo = false; // whether the call has video
RNCallKeep.displayIncomingCall(callUUID, handle, handleType);
RNCallKeep.isCallActive(callUUID);
}
Bug report
[x] I've checked the example to reproduce the issue.
Reproduced on:
Description
In some Lenovo devices the incoming call is not showing up, neither the outgoing calls are received. The isConnectionServiceAvailable method returns true so the problem must reside in the 'no phone account' part. For some reason the setup is returning false too. This is how my options looks like:
I tried to go to calling accounts with hasDefaultPhoneAccount, but this just navigates me to an empty screen with Calling accounts header title. My app is not available in this list. What should i do to enable calling in this tablet? How can i register my app as a calling app?
Steps to Reproduce
Versions
Logs