The app that we are developing requires a push notification feature that notifies the user once a certain threshold is reached. I was able to do the push notifications part using OneSignal, by manually pressing a button and triggering the push notifications. What we want is an approach that would help run this feature even when the app is closed and run even when the app is open. I took a look at the BackgroundMode plugin but it seems like the OutSystems platform sayys that installing this plugin might impact other applications running in the environment. It also uses a Common Plugin that is outdated compared to the one I am using for OneSignal. Thank you so much!

Hello Ray,

Regarding the plugin BackgroundMode, in general, is safe to install. It will use the Common plugin you have installed (this may cause problems to the plugin itself, but not to other applications). The message is a little misleading.

Cheers.

P.S. Just be sure that this is the plugin you need, as I think it prevents your app from "sleeping" while in the background, but it will not make your notification system work if it is closed, not it will have any mechanism to trigger an event when a certain threshold in your database is reached...

Eduardo Jauch wrote:

P.S. Just be sure that this is the plugin you need, as I think it prevents your app from "sleeping" while in the background, but it will not make your notification system work if it is closed, not it will have any mechanism to trigger an event when a certain threshold in your database is reached...

Thank you! I just want to test it out even if the app is in the background and not necessarily close. I tried opening the BackgroundMode demo and demoing the app via outsystems now does not do anything. What does BackgroundMode plugin do? Are there sets of function I can all? All I can see is a ConfigAndroid Action

Thank you so much in advance!

Hello Ray, 

OutSystems Now works with a few plugins, and I think this one is not in the list. 

To properly test you need to create a package for your app with the plugin and install in the device. 

This is a block with some events. The only thing the plugin does is to guarantee that network communication is not stopped... 

But I never used it. 

Cheers

Eduardo Jauch wrote:

Hello Ray, 

OutSystems Now works with a few plugins, and I think this one is not in the list. 

To properly test you need to create a package for your app with the plugin and install in the device. 

This is a block with some events. The only thing the plugin does is to guarantee that network communication is not stopped... 

But I never used it. 

Cheer

Hi Eduardo!
I figured, this was also the case with OneSignal where I had to generate the native app in order to push notifications. Just tried the app just now, the plugin itself does not have very good documentation but is suggested by users. I tried running the app in the background, but does not do anything. Do you have suggestions on how I'll approach this feature? I know a little bit of JavaScript, is there a way for me to achieve this?

First thing.

You said that you want to warn a user when a threshold is reached.
How is your application checking to see if the threshold was hit?

Cheers.

Oh, that was what I was meaning to ask too! Well, currently I'm just using a button to trigger the push notification event and manually checking it during onClick. Is there like an action that I can run everytime the app is running? Like in arduino, there's this void loop function that runs everytime during runtime. Is there something like that in Outsystems? I want to constantly check the value im getting to something the user has set. So when it reaches that value or greater than that value then it triggers the action.

Thank  you so much for helping me!

Hi, 


No, what I asked was how are you checking this threshold. Like, are you changing a value in the database, and then when the value hit a threshold you warn your user? Or is something else? From where comes this information? Local database? Server database? Etc.

Cheers

Eduardo Jauch wrote:

Hi, 


No, what I asked was how are you checking this threshold. Like, are you changing a value in the database, and then when the value hit a threshold you warn your user? Or is something else? From where comes this information? Local database? Server database? Etc.

Cheers


Hi! Apologies for the vagueness. The threshold is set by the user manually (setting a budget via interactive slider) , and is compared to a value calculated in a different screen and is stored in the local database. The value being compared comes from an rpi which calculates a certain value and is multiplied by a facotr which converts it to currency. Thank you so much for bearing with me despite the confusions.

No problem.

That's the point where I wanted to get.

If you are changing the database value, you can check, at the moment the change is being stored, if it reached the threshold defined by the user, and warn the user about it (using whatever means you see fit for this "warning").

The question is: how are you changing this value? Is it changed based on user action? Is it changed based on a javascript timer? When is it changed?

Cheers.

Thank you again so much! I would just like to ask how I would go about checking that the change occurred?

The value changes everytime we run a REST query from our influx database. The RPI sends the data and stores it in Influx. Via REST API, we query the values and store them in our outsystems database. 


I sincerely appreciate the help man.