Open davidperrenoud opened 8 years ago
Right now, emit() can send any object on iOS, but it can only send a Map on Android (a JSON object).
This pull request allows the emit() method on Android to send a string: socket.emit('some_event', 'a string')
socket.emit('some_event', 'a string')
Or a JSON object (as before): socket.emit('some_event', { some_key: 'some value' })
socket.emit('some_event', { some_key: 'some value' })
This is implemented on Android using two methods, one taking a String and the other taking a ReadableMap: https://facebook.github.io/react-native/docs/native-modules-android.html#argument-types
Right now, emit() can send any object on iOS, but it can only send a Map on Android (a JSON object).
This pull request allows the emit() method on Android to send a string:
socket.emit('some_event', 'a string')
Or a JSON object (as before):
socket.emit('some_event', { some_key: 'some value' })
This is implemented on Android using two methods, one taking a String and the other taking a ReadableMap: https://facebook.github.io/react-native/docs/native-modules-android.html#argument-types