mercredi 13 juillet 2016

React-Native Communication Android vs iOS with custom objects

Context: I am using React-Native with Android.
Right now I have a custom object from an Android SDK. I am currently trying to both return this object to react(Javascript) as well as send to my native code (iOS/Android). In iOS I am successful in doing just that by using a RCTResponseSenderBlock. However, when I try using the callbacks in Android, I get errors thrown (Cannot convert argument of type class ). Promises and Events probably wont work since they accept WriteableMaps/WriteableArrays. I even tried using GSON, but the object that I'm attempting to convert isn't converting. Since it's not my object, I won't be able to edit it such that it converts. Please let me know if you have any ideas how to enable the same functionality in android that I have in iOS.

Aucun commentaire:

Enregistrer un commentaire