Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

#822851
Hi Guys,

Having two questions as follows:
1. Is there any possible way to push notification via a ProcessMaker mobile app both iOS and Android?
2. Does the badge automatically visible once the request came in (run in the background)? From my experiences, the badge won't be visible until we go to the app and the app sync the data from the server.

Many Thanks
#822877
sengroty wrote:1. Is there any possible way to push notification via a ProcessMaker mobile app both iOS and Android?
Do you want to send a custom notification?
You can try this code in a trigger:
Code: Select all
$oND = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
//an array of user IDs to receive message:
$aUsers = array('XXXXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXXXX');
$message="This is a test of the emergency broadcast system" ;
$oND->sendMessage($aUsers, $message);
Also you can see the NOTIFICATION_QUEUE table in the database.
sengroty wrote:2. Does the badge automatically visible once the request came in (run in the background)? From my experiences, the badge won't be visible until we go to the app and the app sync the data from the server.
Did you set the sendnotificationscron.php script to periodically execute on your ProcessMaker server?
I think that should fix your problem.
#822947
Having tried following your comments. However, still having some issue as follows:
1. The push pop-up message is visible only when we open the app. Hence, if the app in close, then only vibration. And once click open, produce an error as shown in the attached.
2. I tried to manual execute the cron.php and sendnotificationscron.php, but it's produced some error as shown in the attached.
Attachments
Custom Notification Problem.png
Custom Notification Problem.png (366.43 KiB) Viewed 137 times
Capture.PNG
Capture.PNG (553 KiB) Viewed 137 times
#822956
There is a third parameter in the sendMessage() function which is an array where you can include the cas_index, but I don't have time to look through the code to figure out how to find it. Actually, there is no reason for the users to open the message, since they can already see the message.

If you want to investigate, look in the workflow/engine/src/ProcessMaker/BusinessModel/Light/NotificationDevice.php file at the sendMessage() function. From there you will have to search through the source code to figure out what is passed to sendMessage().

For your problem executing sendnotificationcron.php, what is your version of PM and what version of Windows? Is this a bitnami or manual install?

Can you list the exact commands that you used in the terminal to execute the file?

As mentioned below the Devel module can make thing[…]

All you have to do is type in your new login URL a[…]

Hi Masters, Am fairly new to ProcessMaker and I sh[…]

Hi, :| My Problem: 1. I would like to customiz[…]