admin管理员组

文章数量:1356335

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"
    }

本文标签: androidDnD app takes over control from another appStack Overflow