From Clomosy Docs

No edit summary
No edit summary
Line 21: Line 21:


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
 
<pre>
<pre>
var
var
Line 35: Line 35:
     ShowMessage('Notification could not be sent.');
     ShowMessage('Notification could not be sent.');
}
}
</pre>
<b>Base Syntax</b><br>
<pre>
var
  bodyStr, titleStr,userGUID:string;
begin
  titleStr := 'Clomosy Information';
  bodyStr :='Hello, a personalized notification has been sent to you via the Clomosy application.';
  userGUID := 'WMCLUUP921'; // The given GUID is an example GUID.
 
  if Clomosy.SendNotification(titleStr, bodyStr, userGUID) then
    ShowMessage('Notification sent.')
  else
    ShowMessage('Notification could not be sent.');
end;
</pre>
</pre>


Line 67: Line 52:


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
 
<pre>
<pre>
var
var
Line 81: Line 66:
     ShowMessage('Notification could not be sent.');
     ShowMessage('Notification could not be sent.');
}
}
</pre>
<b>Base Syntax</b><br>
<pre>
var
  bodyStr, titleStr,userGUID:string;
begin
  titleStr := 'Clomosy Information';
  bodyStr :='Hello, a personalized notification has been sent to you via the Clomosy application.';
  userGUID := 'WMCLUUP921'; // The given GUID is an example GUID.
 
  if Clomosy.SendNotifyAllUsers(titleStr, bodyStr, userGUID) then
      ShowMessage('Notification sent.')
  else
    ShowMessage('Notification could not be sent.');
end;
</pre>
</pre>



Revision as of 12:20, 13 November 2024

Notifications are messages sent by applications to convey information or provide a warning about something. The notification feature is a message sent to the notification center to be displayed in the designated notification area of the application, and it may vary depending on the platform.

SendNotification

It is used to send a notification to a selected user in the project. In this feature, the GUID of the user to whom the notification should be sent must be entered as the last parameter.

Example

var
  bodyStr, titleStr,userGUID:string;
{
  titleStr = 'Clomosy Information';
  bodyStr ='Hello, a personalized notification has been sent to you via the Clomosy application.';
  userGUID = 'WMCLUUP921'; // The given GUID is an example GUID.
  
  if Clomosy.SendNotification(titleStr, bodyStr, userGUID)
    ShowMessage('Notification sent.')
  else
    ShowMessage('Notification could not be sent.');
}

SendNotifyAllUsers

It is used to send notifications to everyone except for specific individuals. In this feature, if there is a user who should not receive the notification, their GUID can be entered as the last parameter, enabling notifications to be sent to the others.

Example

var
  bodyStr, titleStr,userGUID:string;
{
  titleStr = 'Clomosy Information';
  bodyStr ='Hello, a personalized notification has been sent to you via the Clomosy application.';
  userGUID = 'WMCLUUP921'; // The given GUID is an example GUID.
  
  if Clomosy.SendNotifyAllUsers(titleStr, bodyStr, userGUID)  
      ShowMessage('Notification sent.')
  else
    ShowMessage('Notification could not be sent.');
}

See Also