0

Is it possible to get the value of a variable that I use in my Java class to a html page using a WebView? For example I will get the total amount and transfer into an online payment.

Does anybody know how I could get this to work?

Robert Massaioli
  • 13,379
  • 7
  • 57
  • 73
User
  • 453
  • 1
  • 8
  • 15

1 Answers1

0

You can use WebView's addJavascriptInterface method to do this.

JeffS
  • 2,647
  • 2
  • 19
  • 24
  • do you have any link of tutorial to do that? – User Jul 26 '12 at 04:02
  • The official docs http://developer.android.com/guide/webapps/webview.html have a good example of going in the opposite direction, but it should be relatively easy to adapt it. – JeffS Jul 26 '12 at 04:04