Android Question How copy files in WebviewCache for another folder?

miguelcleman

Member
Licensed User
Longtime User
I trying copy files from WebviewCache but B4A show a follow message :

java.io.IOException: /data/data/mac.sicord/cache/webviewCache is not a folder.

obs : I use the Webview to show a web page and then try copy the files in the cache.
 

miguelcleman

Member
Licensed User
Longtime User
I try this :

Dim CRLIST As List
CRLIST.initialize
CRLIST=File.ListFiles(File.DirInternalCache &"/webviewCache")

What I realy need is get the file image from captcha, in cache, to decode (not is possible get by other way because it´s dynamic, change every acess).

Thanks!

sorry, my english is very bad.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I recommend you instead to use HttpUtils2 to download the images.
this will not help him. He wants to bypass the login-security (Captcha).
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Have a read of this old post of mine: https://www.b4x.com/android/forum/threads/where-is-cache-control.26038/#post-151081

I think you'll find that the captcha image will not be cached anyway.
There's various methods for a webpage to tell the browser not to cache an image and i'd suspect an image such as a captcha image will use some method to ensure it is not cached.

A possible solution is to inject some javascript into the webpage.
The javascript could get a reference to the captcha image, convert it to a base64 encoded string and then pass that string to a Sub in your b4a code.
There's some example javascript on this page: http://stackoverflow.com/questions/934012/get-image-data-in-javascript
 
Upvote 0
Top