Questions tagged [android-jsinterface]

Android's `JavascriptInterface` is an interface that allows calling of native (Java) code from an embedded Webkit Webview. Security precautions should be taken to ensure that only your own pages will run in the webview, or that all Java code that can be called will not cause a security breach.

Android's JavascriptInterface is an interface that allows calling of native (Java) code from an embedded Webkit Webview. Security precautions should be taken to ensure that only your own pages will run in the webview, or that all Java code that can be called will not cause a security breach.

Official documentation: https://developer.android.com/guide/webapps/webview.html#AddingWebView

34 questions
0
votes
1 answer

videojs addEvent doesn't work in android webview

I am implementing a youtube video player using video.js, I pass the url dynamically in js, and let video.js to play the video. What I want to do is let the js notify android side after the video finished, so I add ended event to call a the android…
Kevin Wang
  • 21
  • 2
0
votes
1 answer

Android JavaScript Bridge - Trigger Events

Probably a simple question, I can call a native function from the JavaScript, for example: Android.setVolume(0.7) However, I do not know how to trigger (from Android/Java), or handle events (JS) that are not caused by user interaction, for example,…
SteveEdson
  • 2,485
  • 2
  • 28
  • 46
0
votes
0 answers

How to use webview.loadURL to get a variable from javascript (Android)

I'm going to try to make this as clear as I can. I'm normally not the best at asking clear questions, so thank you in advanced for reading this and posting any suggestions. I'm writing a simple android application that requires the users position.…
-1
votes
3 answers

Save Json data to ArrayList

I want to read each element and store each json element in an arraylist efficiently from the json format data below getData = {"block_id":"2","body":"

json data" } String id = getData.getString("block_id"); String name =…

Dimitri
  • 677
  • 3
  • 19
  • 46
1 2
3