startEAICollectForView method

void startEAICollectForView(
  1. String nameScreen
)

Implementation

void startEAICollectForView(String nameScreen) {
  if (isCollecting == true) {
    Flagship.logger(
        Level.INFO, "The emotionAI process is already collecting");
    return;
  }
  // Update current scree name
  this.currentScreenName = nameScreen;
  // Create emotion page view
  FSEmotionPageView eventPage = FSEmotionPageView(nameScreen);
  this.sendEmotionEvent(eventPage).whenComplete(() {
    // Start time of collecting
    timeStartCollecting = DateTime.now().millisecondsSinceEpoch / 1000.0;
    // Start event emotion capture
    this._startCollecting();

    // Send TR on start emotionAI
    DataUsageTracking.sharedInstance().processTroubleShootingEAIWorkFlow(
        CriticalPoints.EMOTIONS_AI_START_COLLECTING.name,
        Flagship.sharedInstance().currentVisitor);
  });
}