java - Android Can't Get Cached Image From File Path -
we have cordova app. getting image passed me saved in cache.
i need make file string url:
file picturefile = new file(fileurl)
however when try load image file keeps failing (file not found).
a sample of passed this:
file:///data/data/co.appname.app/cache/tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg
i have tried making following urls , none work when create file
/data/data/co.appname.app/files/tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg file:/data/data/co.appname.app/files/tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg
i tried taking file name tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg
, getting cached directory directly , didn't work either
string path = getfilesdir().getabsolutepath() + tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg
that ends /data/data/co.appname.app/files/tfss-4cb94488-1843-4ad3-8d02-8802008c7186-1685720347.jpg
still comes null.
the image has exist there though because uploading twitter , cordova saving image in cache.
can advise issue might be?
i needed call getcachedir()
not getfilesdir()
.
Comments
Post a Comment