I'm trying to use the bundle method putStringArrayList()
but I'm always getting an error in firebase console.
Bundle bundle = new Bundle();
ArrayList<String> types = new ArrayList<String>();
types.add("test1");
types.add("test2");
bundle.putStringArrayList("Types", types);
mFirebaseAnalytics.logEvent("MainActivity", bundle);
In Firebase console I get this error:
error_value Types
firebase_error 4
And a link to Analytics Error Codes (Event parameter value is too long).
How I am supposed to send more than one value for a specific key?
According to the API docs for logEvent, the params bundle description says
String, long and double param types are supported.
You are getting this error because the param type you're using is a map to a String array list which is not supported. Take a look at this discussion in the firebase google group.
You could instead do something like this, which would essentially be the same.
bundle.putString("Types", types.toString());
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