0

enter image description here

Is there a way for an app running in the background to display/schedule this kind of alert dialog?

EDIT: I know about push notifications, I'm looking for something more intrusive.

Avery235
  • 4,756
  • 12
  • 49
  • 83
  • 2
    This is iOS popup. Occurs when you connect device which is not given Permission to share info with particular machine(window or mac computer) – sschunara Feb 28 '18 at 14:56
  • 1
    Not intending to show this exact dialog, just giving an example of a UIAlert dialog in foreground without app running. – Avery235 Feb 28 '18 at 15:08

2 Answers2

3

It is not possible to add or modify layout outside of your app. The possibilities you have are limited to local and push notifications.

These notifications can be set to "alert" by the user, so that they are intrusive. But there is no way to set that by yourself.

vrwim
  • 13,020
  • 13
  • 63
  • 118
  • Whatsapp seems to be able to present pop up notification on Android if the user choose that setting in the app. Is that capability limited to Android? – Avery235 Feb 28 '18 at 15:38
  • Yes, iOS is very limited in comparison to Android. You can do very little outsde your app. – vrwim Feb 28 '18 at 15:40
  • 1
    Source: https://stackoverflow.com/questions/8229385/set-default-ios-local-notification-style-for-application/9137501#9137501 – vrwim Feb 28 '18 at 15:41
0

You could schedule a local/remote notification as the app enters the background. Maybe even in response to a background fetch or something like that. you cannot present UI to foreground yourself when in the app is in background.

See the Local and Remote Notification Programming Guide

Scriptable
  • 19,402
  • 5
  • 56
  • 72
  • I know about push notifications. I'm looking for something more intrusive. – Avery235 Feb 28 '18 at 15:07
  • Then no, Apple do not allow you to be that intrusive. Hence me saying "you cannot present UI to foreground yourself when in the app is in background" – Scriptable Feb 28 '18 at 15:14