This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Presentation | |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.Picture | |
import android.graphics.SurfaceTexture | |
import android.hardware.display.DisplayManager | |
import android.view.Display | |
import android.view.Surface | |
import android.view.ViewGroup | |
import androidx.compose.foundation.layout.Box |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UNUserNotificationCenter { | |
func removeDeliveredNotificationsAsync(withIdentifiers identifiers: [String]) async { | |
// Calls to `UNUserNotificationCenter.current().removeDeliveredNotifications` schedule work | |
// on a background thread, with no completion handler or async/await interface. There is no | |
// way to know whether the work completed or not. If the notification service extension exits | |
// before the work has been completed, the work is cancelled and notifications are not removed. | |
// | |
// This is really poor API design on Apple's part, and even poorer documentation | |
// | |
// https://stackoverflow.com/questions/54565979#comment104110958_54680225 |