1

您好我正在尝试从仪表板下载我在自定义对象中上传的图像。uid是我获取该自定义对象的 id

  QBContent.downloadFile(uid, new QBEntityCallbackImpl<InputStream>(){
            @Override
            public void onSuccess(InputStream inputStream, Bundle params) {

                Bitmap bitmap = BitmapFactory.decodeStream(inputStream);

                if (bitmap != null) {
                    bankImage.setImageBitmap(bitmap);
                }else {
                    bankImage.setBackgroundColor(ContextCompat.getColor(getActivity(), R.color.blue));
                }
            }

            @Override
            public void onError(List<String> errors) {


                for (String error: errors){
                    Log.d(TAG , "--errors-"+error);
                }

            }
        }, new QBProgressCallback() {
            @Override
            public void onProgressUpdate(int progress) {

            }
        });

收到此错误:

未找到您要查找的实体

任何帮助都受到高度赞赏。

4

1 回答 1

2

我试图ContentCustom我上传图片的地方获取。

如果有人在这里登陆,这是代码:

QBCustomObject qbCustomObject = new QBCustomObject("Your_Class_Name", "Custom_Object_Id");

            QBCustomObjectsFiles.downloadFile(qbCustomObject, "YOUR_FIELD_TO_FETCH", new QBEntityCallbackImpl<InputStream>() {
                @Override
                public void onSuccess() {
                    super.onSuccess();
                }

                @Override
                public void onSuccess(final InputStream result, Bundle params) {
                    super.onSuccess(result, params);

                    Log.d(TAG, "successFull--bitmap");
                }

                @Override
                public void onError(List<String> errors) {
                    super.onError(errors);
                }
            }, new QBProgressCallback() {
                @Override
                public void onProgressUpdate(int i) {
                }
            });

宾果游戏就是这样:-)

于 2015-11-21T13:17:48.910 回答