在android google analtics库上发送多个值
我想在代码中添加多个值和 我的代码是:在android google analtics库上发送多个值,android,google-analytics,Android,Google Analytics,我想在代码中添加多个值和 我的代码是: mTracker.send(new HitBuilders.EventBuilder() .setCategory("send") .setAction("event") .setLabel(key) .setValue(value) .build()); 我假设您希望在跟踪事件时为一个键发送多个值 如果是这种情况,请使用String
mTracker.send(new HitBuilders.EventBuilder()
.setCategory("send")
.setAction("event")
.setLabel(key)
.setValue(value)
.build());
我假设您希望在跟踪事件时为一个键发送多个值 如果是这种情况,请使用StringBuilder类通过包含多个字符串值来准备字符串值
Ex:StringBuilder sb=新的StringBuilder() 某人附加(“StringValue1”) 某人附加(“StringValue2”)
将sb.toString()传递到您的值的位置。不幸的是,值必须是long。如何将long转换为类似字符串的字符串。valueOf(longValue)StringBuilder sb=new StringBuilder();sb.append(String.valueOf(longValue1));sb.append(String.valueOf(longValue2));