-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android crashes when you pass an object to logEvent #5
Comments
AndrewJack
changed the title
Android crashes when you send an object to log event
Android crashes when you send an object to logEvent
Mar 27, 2017
AndrewJack
changed the title
Android crashes when you send an object to logEvent
Android crashes when you pass an object to logEvent
Mar 27, 2017
|
I guess it's missing something like this Taplytics.setUserAttributes = (attributes) => {
Taplytics._setUserAttributes(JSON.stringify(attributes))
} https://github.com/taplytics/taplytics-react-native/blob/master/index.js#L63 |
Hey @AndrewJack Sorry to be so slow on this one. 1.0.11 fixes this. |
hamzahayat
added a commit
that referenced
this issue
Apr 23, 2021
* Added prettier config and formatted files * Formatted MD files * Removed unused constant * Ran prettier --write * Added new line to prettierignore * Added singleQuote rule * Added traillingComma rule
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
Taplytics.logEvent('anEvent', 0, { name: 'anObject' })
on Android you see the following crash.The docs and the ios implmentation suggest passing an object to this method. However the android implementation expects a string which it then converts into a
JSONObject
.https://github.com/taplytics/taplytics-react-native/blob/master/android/src/main/java/com/taplytics/react/TaplyticsReactModule.java#L141
This method should use the ReadableMap which would allow us to pass an object from javascript.
https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableMap.java
Crash
The text was updated successfully, but these errors were encountered: