In my mobile app, when user enters the geofence:

  • if app is in foreground, show user a dialog with a question asking him whether he really wants to visit the location
  • if app is in background, show a local notification asking driver immediate attention (user should open app to see question dialog and respond)

When user leaves the geofence, I'm thinking it makes sense to remove the dialog or local notification.

Wouldn't be an issue for user to see dialog disappearing? Imagine user looks at the screen, and suddenly the dialog disappears.

Are there other ways to handle it? Any examples of apps which do this?

  • Does the "device being in a certain position" mean "based on the device's geolocation"? What type of notification are you using when the app is in the foreground? Do you happen to have a relevant mockup or screenshot you could share with us? Commented May 16, 2018 at 15:38
  • @maxathousand Thanks, I edited the question. Is it clear now? I don't have a mockup.
    – Don Box
    Commented May 16, 2018 at 16:06
  • You might be interested in implementing a 'toast notification' as explained in one of the previous questions on UXSE: ux.stackexchange.com/questions/11998/…
    – Michael Lai
    Commented May 16, 2018 at 22:30
  • @MichaelLai User needs to answer. A standard toast notification on mobile doesn't do this. My idea of a self-closing dialog actually means it works like a toast, but again, it can't be the standard toast we know.
    – Don Box
    Commented May 17, 2018 at 10:20

2 Answers 2


Self-destroying card is nothing new. Google, facebook has already this kind of cards where some offers, ads suddenly disappears based on so many things.

In your case, you are showing a dialog to the user which is based on geofence. So one thing you can do is to show some other information like You are 2Km away from this location. Now if the user is leaving the area, distance will be increasing. Now for an example, by your logic if the distance is over 5Km, you have to destroy it. Now after 5Km, disable the Accept and Reject button of the card and show a Red colored button with a 5 seconds of timer. The button text can be "Closing in 5/4/3/2/1seconds", and then destroy. Also Write that you are more than 5Km away from the location somewhere on top of the button. Also if someone wants to destroy manually can click on the button. I think it will give the user idea that why is it disappearing and also the process will be smoother. But conveying proper information is necessary at each steps.

  • Thanks! A countdown is what I was having in mind too. I hope this is enough for user to understand the nature of self-closing dialog, and what happens if he doesn't take action within that time.
    – Don Box
    Commented May 19, 2018 at 7:36
  • There should be only one action which is to close the dialog. Either it will be closed automatically after countdown ends, or user can close it manually. The Accept or Reject button should be disabled or disappear when he is leaving the geofence. Please upvote my answer if you found it useful.
    – UXPAPA
    Commented May 21, 2018 at 10:08

As I understand the question and scenario:

When the user has the app in the foreground and they're in the geofencing location, you show the dialog.

If they maintain the app's foreground status, and move out of the geofencing area, they've changed state.

You don't need to remove the dialog, you need to change its content to tell the user they're now outside of the area.

  • I rephrased my question, it should be clearer.
    – Don Box
    Commented May 18, 2018 at 10:42
  • It doesn't make sense to keep dialog and replace the question with an information. It's not useful at all for him to know that 1hr later.
    – Don Box
    Commented May 18, 2018 at 10:44
  • I didn't answer the question as it currently is. I answered the question it was. By adding a question to the dialog, yes... things do change. Somewhat. Perhaps knowing the question would help...
    – Confused
    Commented May 18, 2018 at 17:03
  • OK, so what's your suggestion?
    – Don Box
    Commented May 18, 2018 at 17:39
  • I suggest I need to know the question being asked of the user before I can make any kind of suggestion.
    – Confused
    Commented May 18, 2018 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.