send static method

void send(
  1. int nMode,
  2. int nMsgType,
  3. int nCount, {
  4. String? strTitle,
  5. String? strContent,
})

Implementation

static void send(int nMode, int nMsgType, int nCount,
    {String? strTitle, String? strContent}) {
  int nEnable = 1;

  if (nMode == CLCmdSmartNotificationType.modeDelete) {
    if (nMsgType == CLCmdSmartNotificationType.idIncomingCall) {
      slog('del the call');
      clingNative.cwsTrySmartNotification(nEnable, nMode, nMsgType, 0);
    }
    return;
  }

  if (strTitle != null) {
    strContent ??= '';
    clingNative.cwsTrySmartNotificationWithContent(nEnable, nMode, nMsgType,
        nCount, strTitle.toNativeUtf8(), strContent.toNativeUtf8());
  } else {
    clingNative.cwsTrySmartNotification(nEnable, nMode, nMsgType, nCount);
  }
}