Skip to content

Flutter silent invocation

Silent invocation uploads a bug report from your Flutter app directly, instead of showing Appelium's report form. It is useful for a customer support action, a failure state that your app detects or a clearly labelled reporting UI of your own.

Bug reporting must be enabled. invokeSilently captures the activity log, a screenshot if screenshots are enabled, the attachment of your delegate and the current screen, then uploads the report. It shows no Appelium UI and does not include the screen recording of the form.

Future<void> sendSupportReport() async {
  try {
    await AppeliumFeedback.invokeSilently(
      reporterEmail: currentUser?.email,
      title: 'Checkout support report',
    );
    showConfirmation();
  } on NetworkRequestException catch (exception) {
    showUploadError(exception.message);
  }
}

Both arguments are optional:

  • title identifies the report in the Dashboard;
  • reporterEmail stores the reporter's contact only if your app supplies it. An invalid address is left out.

Do not send silent reports automatically for ordinary recoverable events without a clear user expectation. Each one uploads diagnostics and counts as a bug report.

Capture useful context

Log the relevant state before you send the report:

AppeliumFeedback.logWarning(
  'Checkout entered recovery flow after timeout',
  domain: 'Checkout',
);

await AppeliumFeedback.invokeSilently(title: 'Checkout timeout: recovery flow');

Use the title for a stable, readable summary. Put changing values and structured context into console logs rather than generating a unique title for every report.

Disable automatic gestures

Silent invocation is independent of the shake gesture. If your app reports only through its own UI, turn the invocation events off:

AppeliumFeedback.start(
  apiKeys: apiKeys,
  bugReporting: const BugReportingConfiguration.enabled(invocationEvents: {}),
);

Handle failure

The Future completes once Appelium has stored the report. It throws a NetworkRequestException when the upload fails, for example because the device is offline or the API key is invalid. Its message describes the failure in English; show your own error message or offer a retry.

If bug reporting is not enabled in start, or the SDK has not been started, the call completes without sending anything and without throwing. Check the start call if reports do not arrive.