logTimedEventId static method
Records a custom timed event named eventId
Logs eventId
as a timed event with the second key timedId
.
Returns the event recording status of the logged event.
Example for timed event logging with the 2nd key: 0 1 2 3 4 5 6 sec. ID1 ID2 ID3 - - - ID2: 3 sec. - - ID3: 2 sec.
-
-
-
-
-
- ID1: 6 sec.
-
-
-
-
Flurry.logTimedEventId('TimedEventName', 'InstanceId1'); // sleep 1 sec. Flurry.logTimedEventId('TimedEventName', 'InstanceId2'); // sleep 2 sec. Flurry.logTimedEventId('TimedEventName', 'InstanceId3');
// sleep 1 sec. Flurry.endTimedEventId('TimedEventName', 'InstanceId2'); // ID2 duration: 3 sec. // sleep 1 sec. Flurry.endTimedEventId('TimedEventName', 'InstanceId3'); // ID3 duration: 2 sec. // sleep 1 sec. Flurry.endTimedEventId('TimedEventName', 'InstanceId1'); // ID1 duration: 6 sec.
Implementation
static Future<EventRecordStatus> logTimedEventId(
String eventId, String timedId) async {
if (flurryAgent != null) {
int eventRecordStatus =
await flurryAgent!.logTimedEventId(eventId, timedId);
return EventRecordStatus.values[eventRecordStatus];
}
return EventRecordStatus.eventRecorded;
}