blackberry 10 - Cannot resolve image path using content provider in BB10 Android Runtume -


i have ported android application bb10. in application there 1 feature can send email image attachment. in android works fine in bb10 image not attached mail.

i implement custom content provider android. when select image give path "content://providername/mail/attachment/image name" doesn't work on bb10.

in bb10 relative path "content: //" not working. bb10 works on absolute path.

code sample:

path of image: content://com.abc.provider.local.file/mail/attachment/1.jpg uri.parse(localfileprovider.mail_file_uri + picture.getfilename()

  in above code 

localfileprovider.mail_file_url = content://com.aba.provider.local.file/mail/attachment picture.getfilename() = 1.jpg how convert path absolute path example : file://

bb10 has bar-descriptor.xml file contains info app. 1 of settings location of assets. example - if want include directory called "assets" package - have followinf xml entry in ..bar.xml file

<asset path="assets">assets</asset> 

this assumes have folder called "assets" in root of project.

now can place additional folders , files under "assets" , can @ using following uri

asset:///graphics/myimage.png 

this image located under /assets/graphics/myimage.png

hope helps.


Comments