How to get URI from an asset File?

后端 未结 11 1668
慢半拍i
慢半拍i 2020-11-22 14:27

I have been trying to get the URI path for an asset file.

uri = Uri.fromFile(new File(\"//assets/mydemo.txt\"));

When I check if the file

11条回答
  •  天命终不由人
    2020-11-22 15:08

    Please try this code working fine

     Uri imageUri = Uri.fromFile(new File("//android_asset/luc.jpeg"));
    
        /* 2) Create a new Intent */
        Intent imageEditorIntent = new AdobeImageIntent.Builder(this)
                .setData(imageUri)
                .build();
    

提交回复
热议问题