Closed carotkut94 closed 2 years ago
@carotkut94 did you figure out this error?
@carotkut94 I also would be interested in a solution.
@carotkut94 we fixed this issue by asking for permissions to the phone before checking if they have a phone account. We used the permission_handler package and added this line before we checked for phone accounts.
await Permission.phone.request();
bool hasPhoneAccount = await _callKeep.hasPhoneAccount();
also we had to add READ_PHONE_NUMBERS to our android manifest permissions.
<uses-permission android:name="android.permission.BIND_TELECOM_CONNECTION_SERVICE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
The example app works fine on pre android 12 devices, and it also works on android 12 device, if the target sdk and compile sdk is kept at 30.
It throws this error and doesn't ask for any permissions