clear missed calls and clear notification from android bar

前端 未结 2 1921
渐次进展
渐次进展 2021-01-28 09:54

Using this code I managed to mark all missed calls as read:

ContentValues values = new ContentValues();
        values.put(Calls.NEW, 0);
        if (android.os.         


        
2条回答
  •  庸人自扰
    2021-01-28 10:06

    How can I also clear the notification bar for calls in android?

    You don't. That Notification is put there by another app, and you have no means of controlling whether that Notification is displayed, short of building a ROM mod that changes the behavior of that other app.

    UPDATE: Since this answer was originally written, NotificationListenerService was added and can clear notifications, but only on Android 4.3+.

提交回复
热议问题