react-native-incall-manager: undefined is not an object _InCallManager.start

I’m trying to install this for android and it’s not working. All I did was

  1. npm install
  2. import InCallManager from ‘react-native-incall-manager’;
  3. InCallManager.start()

And I am getting the error: undefined is not an object (evaluating '_InCallManager.start')

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 19 (11 by maintainers)

Most upvoted comments

For anyone that has an issue with Android, I had to manually add the following to MainApplication.java

import com.zxcpoiu.incallmanager.InCallManagerPackage;
    @Override
    protected List<ReactPackage> getPackages() {
      mReactNativePushNotificationPackage = new ReactNativePushNotificationPackage();
      return Arrays.<ReactPackage>asList(
          new InCallManagerPackage(),
      );
    }