最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - DnD app takes over control from another app - Stack Overflow

programmeradmin2浏览0评论

I have written an app called "calm" that mutes the phone when it's face down. It had been working ok since a few months ago. But now the "DnD" app (on Samsung phone) takes over control (not sure, maybe in the night) and closes/kills(?) the "calm" app leaving the phone in DnD (do not disturb) mode. My code uses:

mNotificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_ALARMS);

to set and this to reset dnd:

mNotificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_ALL);

How can I avoid DnD app taking control? I have no time schedule set on the "DnD" app and dnd is not on there. Config details:

    compileSdk 34

    buildFeatures {
        buildConfig = true
    }

    defaultConfig {
        applicationId "com.xxxxxxxx.calm"
        minSdkVersion 26
        targetSdkVersion 34
        versionCode 210
        versionName "2.1.0"
    }
发布评论

评论列表(0)

  1. 暂无评论