簡體   English   中英

Quickblox Android聊天-音頻附件上傳失敗

[英]Quickblox android chat - audio attachment uploading failed

我正在嘗試使用quickblox api上傳音頻文件。 我可以在Nexus 7中上傳音頻附件。問題是,當我嘗試使用相同的代碼在其他可用設備(華碩zenphone和Karbonn Android設備)中上傳音頻文件時,出現quickblox響應異常。 例外是“ content_type太短(最少5個字符),content_type無效”。 請有人幫我解決這個例外。 我在以下塊中遇到異常。

   /** 
     * This method will invoke when user try to upload a file in the chatbox.
     *
     * @param dialogId
     * @param inputFile
     * @param messageId
     * @return
     * @throws Exception
     *
     **/

public QBFile loadAttachFile(String dialogId, final File inputFile, final String messageId) throws Exception {
    QBFile file = null;

    try {
        file = QBContent.uploadFileTask(inputFile, true, (String) null,
                new QBProgressCallback() {

                    @Override
                    public void onProgressUpdate(int arg0) {
                        // TODO Auto-generated method stub

                        if (!lastUpdatedProgress.contains(arg0)) {
                            lastUpdatedProgress.add(arg0);
                            //Here we will update the progress of the progressbar details
                            updateAttachmentUploadingProgress(messageId, arg0);
                        }

                    }
                });
    } catch (QBResponseException exc) {
        throw new Exception(context.getString(R.string.dlg_fail_upload_attach) );
    }
    return file;
}

這是'acc'文件格式和'android.webkit.MimeTypeMap'類的問題

QuickBlox已發布了帶有修復程序http://quickblox.com/developers/Android#Framework_changelog的Android SDK 2.3版本

看看這個

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM