检测新的MMS(的Andr​​oid 2.1) [英] Detecting new MMS (Android 2.1)

查看:128
本文介绍了检测新的MMS(的Andr​​oid 2.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想认识新的MMS味精到货(在它下载到收件箱)。我做了以下内容:

I'd like to recognize arrival of new MMS msg (after it is downloaded to inbox). I am doing the following:

private MMSContentObserver mMmsCO;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    h = new Handler();
    mMmsCO = new MMSContentObserver(h);
    getContentResolver().registerContentObserver (Uri.parse("content://mms"), true, mMmsCO);
}

其中

    private class MMSContentObserver extends ContentObserver {

    public MMSContentObserver(Handler h) {
        super(h);
    }               

    @Override
    public boolean deliverSelfNotifications() {
        return false;
    }

    @Override
    public void onChange(boolean selfChange) {
        super.onChange(selfChange);
    }
}

然而,的onChange是没有得到调用。我在想什么? 先谢谢了。

However, onChange is not getting called. What am I missing? Thanks in advance.

推荐答案

彩信内容提供商是不是SDK的一部分,但它可以用来...这里真正的答案将是很好的,因为所有的通讯应用程序使用的内容: // MMS以某种方式或形状。

The MMS content provider isn't part of the SDK but it can be used... a real answer here would be nice since all messaging apps use content://mms in some way or shape.

由于谷歌决定不规范MMS我们都必须测试每个电话在那里,但我们仍然需要能够处理彩信在我们的应用程序。

Since google decided not to standardize MMS we are all have to test on every phone out there but we still need to be able to handle MMSs in our apps.

这篇关于检测新的MMS(的Andr​​oid 2.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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