Call microflow when app is resumed from a push notification

1
Hi all, I want to be able to have some control of what happens when a user resumes the app (from the background) by clicking on a push notification. Preferable I would like to trigger a microflow which has a tracable ID in its context so you know from which push notification it is called. As a workaround I would already be satisfied if I could trigger a microflow without any context. Then I would redirect the user to an overview of 'open' push notifications where I will build the logic around. I tried to build this logic in the microflow that I use as default home page and refresh the app when it is opened from the background (I used this code in the index.html). This worked but it broke the camera and file uploader, since in these cases you do not want the page to reload. I saw this was already asked on Github as well: https://github.com/mendix/MxPushNotifications/issues/48 I think it is some basic functionality that you want, so somebody must have struggled with this before. Speak up! :)
asked
1 answers
0

I think I got part of the solution.

This change in the widget/pushNotifications.js in the mpk refreshes the page once opening the push notification from the background.

https://gist.github.com/royyeah/a33b5fec322c6c1d50e78ff334c5d571

I will try to improve it so that it triggers a microflow next week.

 

answered