Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase logEvent String length

I'm trying to using firebase, but when I want to logging the most visited url from user by using logEvent this show error. Here is the code:

Bundle bundle3 = new Bundle();
bundle3.putString(FirebaseAnalytics.Param.ITEM_ID,"browser_most_url_bookmarked");
bundle3.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "http://vozforums.com/forumdisplay.php?f=33");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle3);

Logcat shows:

W/FA: Value is too long; discarded. Value kind, name, value length: param, content_type, 42

I can't understande why, can anyone help me?

like image 596
user3611168 Avatar asked Jul 08 '16 07:07

user3611168


1 Answers

Yea.. found the issue.

Your this line is causing this log:

bundle3.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "http://vozforums.com/forumdisplay.php?f=33");

They are talking about FirebaseAnalytics.Param class Your log is also informative. These are some points to focus on:

Value is too long: means you are passing somewhat large string than expected.

Value kind, name, value length: param, content_type, 42

means

Kind = Param
Name = content_type
Length = 42

From Documentation in few words:

Param names can be up to 40 characters long
Param values can be up to 100 characters long

But your value length is 42 which is larger than maximum supported length of Param value (i.e. 36)

Hence, you are getting that Log. Hope you are clear by now.

like image 93
Chintan Soni Avatar answered Sep 28 '22 06:09

Chintan Soni