shaun-chiang / rn-android-pip

React Native Android Picture-in-Picture Library.
MIT License
17 stars 24 forks source link

Error while calling enableAutoPipSwitch #6

Open Servo97 opened 4 years ago

Servo97 commented 4 years ago

Hi, I'm using React Native 0.63 and installed rn-android-pip as told in the readme.md file. I'm getting this error when I call AndroidPip.enableAutoPipSwitch();

TypeError: AndroidPip.enableAutoPipSwitch is not a function. (In 'AndroidPip.enableAutoPipSwitch()', 'AndroidPip.enableAutoPipSwitch' is undefined)

I also get this warning while importing the module: Could not find a declaration file for module 'react-native-android-pip'. '/home/user/Sarvesh/VOICE_APP/REACT_NATIVE/Voice_App/node_modules/react-native-android-pip/index.js' implicitly has an 'any' type. Trynpm install @types/react-native-android-pipif it exists or add a new declaration (.d.ts) file containingdeclare module 'react-native-android-pip';`

Can you please help?

CodeDruid13 commented 4 years ago

Hi, I'm using React Native 0.63 and installed rn-android-pip as told in the readme.md file. I'm getting this error when I call AndroidPip.enableAutoPipSwitch();

TypeError: AndroidPip.enableAutoPipSwitch is not a function. (In 'AndroidPip.enableAutoPipSwitch()', 'AndroidPip.enableAutoPipSwitch' is undefined)

I also get this warning while importing the module: Could not find a declaration file for module 'react-native-android-pip'. '/home/user/Sarvesh/VOICE_APP/REACT_NATIVE/Voice_App/node_modules/react-native-android-pip/index.js' implicitly has an 'any' type. Trynpm install @types/react-native-android-pipif it exists or add a new declaration (.d.ts) file containingdeclare module 'react-native-android-pip';`

Can you please help?

I've used React home pressed to create home event function and toggling pip. Works well

freeboub commented 3 years ago

It is because the package deployed on npm is not the last version ! You need to clone this repo to have this feature