cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stevel
Level: Powered On

exit() best practice?

Hi all,

We have a nice PowerApps phone app (15 screens) helping our mobile crisis clincians look up healthcare data when in the field. The clinicians love it but the compliance team is concerned about the phone app as another way to accidentally expose private data. 

 

For instance, when my spouse (who knows my phone lock phrase) picks up my phone to make a quick call - how do I keep her from accidentally seeing someone's private data? 

 

I'd appreciate hearing about best practices regarding protecting information (healthcare or not). Things like:

- logins

- exiting the idle application

- etc.

 

Reading forum posts, I see that exit(true) on a timer based on Last Activity is one way to go:

Is-configuring-an-Idle-Timeout-or-Inactivity-Timeout-possible-in

 

Question: is there any app level event that I can call from outside the app to cause it to either exit or preferably go back to the login screen? I'm hoping to use a Flow or something like the current Notification connector? I already log every button press and screen onVisible event as a way to monitor performance - I'd like to use the logs to determine when the app needs to reset back to the login screen.

 

Thanks for any advice as I try to balance the productivity of clinicians with the risk/compliance concerns of unintended exposure to others seeing the data they use.

 

...Steve

3 REPLIES 3
NEPatton
Level 8

Re: exit() best practice?

You might experiment with the "OnHidden" event -- but I doubt that works....  Another thing would to be see if the "OnStart" event fires every time the app starts -- even if it was technically already open.  If this is true, then you could use that as well to always go back to the login screen.  

 

I think you might have hit on a cool feature that could be added.  There is the "OnStart" app-level event -- I think other app-level events could be really useful...

 

"OnLoseFocus"

"OnGainFocus"

"OnClose"

etc

 

 

Stevel
Level: Powered On

Re: exit() best practice?

Hi,

 

I've been working with the timers to get the app to return to the splash page after an idle period. This works fine, however, since we don't have an onExit or onSuspend event for the app and the onStart appears to fire only once - I haven't found have a reliable way to tell when the app has been idle while suspended.

 

There is a way to tell when they return (check now() vs. last active datetime saved in global variable) but when they come back to the app, I want them to be able to go right to work - as they are no longer idle. I still may implement this as starting back in from the splash screen is not a bad way to restart to use the app.

 

I'm open to other solutions...Steve

 

 

Stevel
Level: Powered On

Re: exit() best practice?

Hi,

 

I've been working with the timers to get the app to return to the splash page after an idle period. This works fine, however, since we don't have an onExit or onSuspend event for the app and the onStart appears to fire only once - I haven't found have a reliable way to tell when the app has been idle while suspended.

 

There is a way to tell when they return (check now() vs. last active datetime saved in global variable) but when they come back to the app, I want them to be able to go right to work - as they are no longer idle. I still may implement this as starting back in from the splash screen is not a bad way to restart to use the app.

 

I'm open to other solutions...Steve

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 136 members 3,173 guests
Please welcome our newest community members: