I'm trying to import a package only on Android here is the package anyone has any idea if this is possible?
import {ProcessingManager} from 'react-native-video-processing';
You can separate platform code by creating two different files your_file_name.android.js
and your_file_name.ios.js
.
For example, you have to have this files in your directory
BigButton.ios.js
BigButton.android.js
You can then require the component as follows:
import BigButton from './BigButton'
reference: react netive
I am not sure for this way
var ProcessingManager;
if (Platform.OS == 'android') {
ProcessingManager = require('react-native-video-processing');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With