Native Modules for React Native Android
Ryan Linton

Great tutorial Tyan. I managed to create a module that plays mp3 from url using MediaPlayer. Now the problem that i am facing is that i want to register these two callbacks setOnPreparedListener and setOnCompletionListener. but when i do so i get this error

The callback play() exists in module ImagePicker, but only one callback may be registered to a function in a native module

any idea how to fix that

Like what you read? Give Sajjad Ashraf a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.