From Clomosy Docs

(Created page with "<div class="alert alert-danger" role="alert" data-bs-theme="light"> Please test it on a mobile device. </div> 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.<br> <h2> SendNotification </h2> <div class="alert alert-ligth border b...")
 
No edit summary
Line 4: Line 4:


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.<br>
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.<br>
<div class="alert alert-ligth border border-3 border-warning rounded-5 p-4 shadow-sm" role="alert">
<strong>Information:</strong><br>
To access the user GUID information in the developer environment, the following steps can be followed.<br>
In the developer environment, click on the name of the user included in the project member list, and a screen like the one below will appear. Here, when you click on the GUID information, the GUID is copied and accessed.<br>
[[File:UserGUIDV1.0.png|frameless|400px]]<br>
</div>


<h2> SendNotification </h2>
<h2> SendNotification </h2>
Line 15: Line 23:
<b>TRObject Syntax</b><br>
<b>TRObject Syntax</b><br>
<pre>
<pre>
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.');
}
</pre>
</pre>
<b>Base Syntax</b><br>
<b>Base Syntax</b><br>
<pre>
<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>


<h2> SendNotifyAllUsers </h2>
<h2> SendNotifyAllUsers </h2>
Line 38: Line 58:


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.<br>
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.<br>
<div class="alert alert-success" role="alert" data-bs-theme="light">
The GUID of a single user can be entered.<br>
*Clomosy.SendNotifyAllUsers('Clomosy', 'Clomosy Notif', '5F81K4U84J');
The GUIDs of multiple users can also be entered.<br>
* Clomosy.SendNotifyAllUsers('Clomosy', 'Clomosy Notif', '5F81K4U84J ,DO5625ARP8');
</div>


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
<b>TRObject Syntax</b><br>
<pre>
<pre>
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.');
}
</pre>
</pre>
<b>Base Syntax</b><br>
<b>Base Syntax</b><br>
<pre>
<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>
<div class="alert alert-info" role="alert" data-bs-theme="light">
If you want to examine a sample application, there are examples on the [[Code Example]] page.
</div>
<h2> See Also </h2>
* [[Clomosy_Class#Notification_&_Messaging_System | Notification & Messaging System]]

Revision as of 10:49, 15 October 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
TRObject Syntax

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.');
}

Base Syntax

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;

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
TRObject Syntax

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.');
}

Base Syntax

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;

See Also