明确错过了Android的酒吧通话和清晰的通知 [英] clear missed calls and clear notification from android bar

查看:160
本文介绍了明确错过了Android的酒吧通话和清晰的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用这个code我设法标记所有未接电话为已读:

  ContentValues​​值=新ContentValues​​();
        values​​.put(Calls.NEW,0);
        如果(android.os.Build.VERSION.SDK_INT> = 14){
            values​​.put(Calls.IS_READ,1);
        }
        StringBuilder的,其中=新的StringBuilder();
        where.append(Calls.NEW);
        where.append(= 1并且);
        where.append(Calls.TYPE);
        where.append(=?);        context.getContentResolver()。更新(Calls.CONTENT_URI,价值观,where.toString()
                新的String [] {Integer.toString(Calls.MISSED_TYPE)});

但在Android通知栏我仍然有未接来电的标志。我怎么也清除通知栏在Android的电话?


解决方案

  

我怎么也清除通知栏在Android的电话?


您没有。这通知被另一个应用程序放在那里,你必须控制该通知是否显示没有办法,总之建设一个ROMmod改变其他应用程序的行为。

更新:既然这个答案最初写,加入 NotificationListenerService 键,可以清除通知,但仅适用于Android 4.3 +

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

ContentValues values = new ContentValues();
        values.put(Calls.NEW, 0);
        if (android.os.Build.VERSION.SDK_INT >= 14) {
            values.put(Calls.IS_READ, 1);
        }
        StringBuilder where = new StringBuilder();
        where.append(Calls.NEW);
        where.append(" = 1 AND ");
        where.append(Calls.TYPE);
        where.append(" = ?");

        context.getContentResolver().update(Calls.CONTENT_URI, values, where.toString(),
                new String[]{ Integer.toString(Calls.MISSED_TYPE) });

but in the android notification bar I still have a flag with missed calls. How can I also clear the notification bar for calls in android?

解决方案

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+.

这篇关于明确错过了Android的酒吧通话和清晰的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆