1

I am working on some charting library in javascript that call from android.

Understand that JavascriptInterface only available after Android API Level 17 (4.2.2)

http://developer.android.com/reference/android/webkit/JavascriptInterface.html

I want to support android device before 4.2.2

is there anyway to pass a json to javascript?

1 Answer 1

1

Understand that JavascriptInterface only available after Android API Level 17 (4.2.2)

addJavascriptInterface() has been around since API Level 1. What you are linking to is the @JavascriptInterface annotation, which has only been around since API Level 17. Neither of these things have anything to do with your problem.

is there anyway to pass a json to javascript?

On API Level 19+, use evaluateJavascript(). On API Level 18 and below, use loadUrl("javascript:"), using the same basic syntax used for bookmarklets on desktop browsers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.