priteshrnandgaonkar / react-native-call-detection

react-native package to detect call states
MIT License
191 stars 110 forks source link

Doesn't work in Android 12 #108

Open malanchito opened 2 years ago

malanchito commented 2 years ago

Like in a similar issue opened here in May the function startListenerTapped doesn't get called

  startListenerTapped = () => {
      this.callDetector = new CallDetectorManager((event, phoneNumber)=> {
        if (event === 'Offhook') {
          console.log('Offhook')
        }
        ...
  }

When i check and request the permissions using react-native-permissions i get 'denied' when i check and 'blocked' when i request it (so on the device i don't get asked to allow the permission)

check(PERMISSIONS.ANDROID.READ_PHONE_STATE)
      .then((result) => {
         console.log("PERMISSIONS:",result)
         request(PERMISSIONS.ANDROID.READ_PHONE_STATE).then((result1) => {
          console.log("PERMISSIONS request:",result1)
        });
      })
      .catch((error) => {
        console.log("PERMISSIONS:",error)
      });
ciaoamigoschat commented 2 years ago

Even myself problem. Patch applied: https://github.com/priteshrnandgaonkar/react-native-call-detection/issues/105 but events are not called mine.

paulrinaldi commented 4 weeks ago

Is anyone else using the config plugin with expo and seeing the following error?

{
  name: 'PluginError',
  isPluginError: true,
  code: 'INVALID_PLUGIN_IMPORT',
  cause: undefined
}