I have to send list of data in firebase events but as firebase not supporting to send ArrayList data in firebase event property. So, i am sending multiple events using for loop. Events are calling multiple times but its value contains multiple entry. for example i have 4 items to send in firebase, and events are calling 4 times as expected, but its event property contains 4 values which is wrong. I want to send multiple events in for loop with single value.
I tried multiple ways but its showing above result. My code snippet is here,
val bundle = Bundle()
for (reorder in reorderList) {
bundle.putString(PROP_DRUG_NAME, reorder.drug)
bundle.putString(PROP_MISSED_DUE_DATE,if (reorder.missedDrug) PROP_VALUE_YES else PROP_VALUE_NO)
FirebaseAnalytics.getInstance(context)?.logEvent(EVENT_DRUGS_REORDER, bundle)
bundle.clear()
}
Also Android studio console showing items one time
Logging event (FE): drugs_reorder, Bundle[{firebase_event_origin(_o)=app, firebase_screen_class(_sc)=xxxActivity, firebase_screen_id(_si)=xxx, drug_name= xxxx, missed_due_date=yes}]