4

I have a page loaded in webview/Cordova.
Is it possible to get bitmap object of a picture loaded in that webview with id/class XYZ ?

I know it is possible to pass the image url to java and load Image there and create bitmap object out of it. But in that case image has to be loaded again.

Vishnudev K
  • 2,874
  • 3
  • 27
  • 42

2 Answers2

3

Finally I got a workaround for this problem.
It has 3 steps

1.convert image in Webview into base64String
(This link will help you to do that.)

2.Pass base64String to java using cordova bridge.

3.Decode base64string in java to create a bitmap
(This link will help you to do that.)

Community
  • 1
  • 1
Vishnudev K
  • 2,874
  • 3
  • 27
  • 42
1

android 2.3 can get image_file from cache,4.0+,useless

mr.chen
  • 9
  • 3