android 編輯多媒體訊息時日曆和連絡人附件不能與其他附件共存

來源:互聯網
上載者:User

標籤:

改MmsAttachmentEnhanceImpl.java檔案,改成與Op01MmsAttachmentEnhanceExt.java的內容一致就可以實現。


public boolean isSupportAttachmentEnhance() {
     return true;     //改為返回true
}
 
public void setAttachmentName(TextView text, int size) {
if (size > 1) {
         text.setText(getString(R.string.multi_files));    //folder模式下多個外部附件的字串顯示,這個字串需要自己定義
      }
}
 
 public void setSaveAttachIntent(Intent i, int smode) {
        if (smode == MMS_SAVE_OTHER_ATTACHMENT ||
            smode == MMS_SAVE_ALL_ATTACHMENT) {
            Bundle data = new Bundle();
            data.putInt(MMS_SAVE_MODE,smode);
            i.putExtras(data);
        }
     }
 
    //get save attachment mode through intent
     public int getSaveAttachMode(Intent i) {
        int smode = -1;
        Bundle data = i.getExtras();
        if (data != null) {
            smode = data.getInt(MMS_SAVE_MODE);
        }
        return smode;
     }
 
KK2及之後版本:
修改DefaultMmsAttachmentEnhanceExt.java 這個檔案,改成與Op01MmsAttachmentEnhanceExt.java的內容一致。
還要在DefaultMmsFeatureManagerExt.java的isFeatureEnabled方法內添加
 case MMS_ATTACH_ENHANCE:
                return true;

android 編輯多媒體訊息時日曆和連絡人附件不能與其他附件共存

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.