27
Views
5
Comments
Run client action in background
Question
Application Type
Mobile

Hello there my mates i am having a problem in my mobile application. I need to send a notification to the user but to do so i need that my client action is always running(in second plane) even when the application is closed, how can i achieve this?

mvp_badge
MVP
Rank: #43

Hello Nuno,

Do you mean push notifications? There's a few components to achieve this like Pushwoosh or OneSignal. If you all you need are simpler in-app notifications, this component would also fit.

Can you share some background on what you're trying to build? This will help everyone give you more detailed answers.

Rank: #171

Hi Nuno, 

If you have to send a notification depending on some condition, you should consider to place this logic in your server side.

For example, you can set a timer to run periodically and then send a notification depending on whatever you want.


Anyway if you want to try implement some asynch Client Actions you can try to take a look at this documentation.
It will explain how to run client actions without the need to wait for it response, but afaik you will not be able to run it in background when the app is closed or in second plane for example.


If you need that you can try to use this other plugin to prevent the app from sleeping, if this don't suit your needs I'm afraid you need to write some custom cordova code on a plugin to to what you want.


Check also these other posts to see if they help:

- https://www.outsystems.com/forums/discussion/35157/background-client-action/

- https://www.outsystems.com/forums/discussion/21539/how-to-display-push-notifications-while-app-is-in-background/


Hope it helps, 


RR :)

Rank: #329

Hi Nuno,

You can try using BPTs or background timers to execute the logic. Also for push notification there are many components like Firebase which uses Google APIs.

BPT will help you in this situation as when the condition met you can launch the process to execute the notification process and it will execute in background.

for reference - https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Processes_(BPT)