如何打开图库并通过单击图像直接选择图像到adobe照片编辑器?

时间:2016-09-30 11:44:05

标签: adobecreativesdk creative-cloud

我正在使用sdk creativecloud (照片编辑器)。我正在尝试打开画廊并选择它,我越不希望她的va用于imageView。我希望我的应用程序与 aviary 应用程序(也是照片编辑器)类似

问题:何时访问图库用户选择图像?是否重定向到直接运输sdk编辑器?

1 个答案:

答案 0 :(得分:0)

fab_explore = (FloatingActionButton) findViewById(R.id.fab);

    fab_explore.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent pickIntent = new Intent(Intent.ACTION_GET_CONTENT);
            pickIntent.setType("image/*");
            Intent chooserIntent = Intent.createChooser(pickIntent,"Pick Picture");
            startActivityForResult(chooserIntent, CAPTURE_LOCAL_PHOTO_ACTIVITY_REQUEST_CODE);
        }
    });

现在在活动结果上调用这些来访问传递photoeditor的路径

 if (requestCode == CAPTURE_LOCAL_PHOTO_ACTIVITY_REQUEST_CODE) {
        if (resultCode == RESULT_OK) {
            Uri imageUri = data.getData();


            Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
                    .setData(imageUri)
                    .build();

            startActivityForResult(imageEditorIntent, 1);


        } else if (resultCode == RESULT_CANCELED) {
            Log.i("MainActivity", "onActivityResult: failed to get image");

        } else {
        }