Sending push notification automatically

0
Hi,   I am doing an IOT project which involves sensors such as temp sensor etc. I am building both web and native mobile app for this project. I am currently stuck at push notification. I am using this link: https://docs.mendix.com/howto/mobile/native-remote-notifications. I have managed to solve and get it to send notifications. I have done part 3 of this tutorial ( I faced some difficulty in part 4 but I think that it is not needed for my project at the moment).   The tutorial teaches us on how to manually send notifications by sending a message to a device. However, I would love users to receive notification automatically when a sensor reaches a certain value ( for eg, temp sensor reaches 27 degrees, user receives a notification). I was told by a professor in slack to create a queued task to send the notification.    By using this link to learn more about queued tasks: https://docs.mendix.com/refguide/task-queue, I have tried a little to see how it works. For my project I am currently using Mendix 8, and it dosent seem that “queued task” is available? I am using a free version of Mendix 8, may I please know if this is feasible for free users? Are there any other ways if it is not feasible? I am currently using Mendix 8 as I want to use the weather forecast given in the app store as it is only available in Mendix 8, not Mendix 9. There are also some errors when I try to run Mendix 9 native mobile app too. 
asked
2 answers
0

Hi Andy,

 

The TaskQueue you are referring to is only available in Mendix 9. There is another module in the appstore called ‘ProcessQueue’ where you can create the same thing as you would with the taskqueue. See for more information:

https://docs.mendix.com/appstore/modules/process-queue

I must warn you though. The ProcessQueue is a hard module to understand. I would advise you to go to Mendix 9 if that is possible. I'm not familiar with the weather forecast in the appstore, but i think it is easier to fix that in Mendix 9, than to use the process-queue. 

 

If you want to make real-time notification you would need to create a microflow that checks the value of you measurements everytime they come in via your Queue. If they exceed a certain value you can then create a notifications for your users.

 

Hope this helps! 

 

answered
0

Hi Martijin, 

 

Thank you for replying. Haha ya after just a day of researching and looking at the resources I found it to be quite difficult and hard to implement for a single student. Hence, I decided to go for another approach after searching for an alternative earlier today. 

 

I found this link, https://docs.mendix.com/howto/mobile/sending-push-notifications. I would most likely go for this approach instead. Since I am using a free version of Mendix 8, I would probably create a button in the responsive web dashboard to manually trigger the microflow, “ SendMessageToAllUsers”. Upon clicking this button, when a sensor value reaches a certain value, it will automatically send a push notification to my native mobile app to notify users. I have not tried it yet so I do not know for sure if I am able to make it work. May I seek for your advice if I do encounter problems when I am building this microflow please?

answered