Android: Is there a way to execute JavaScript from my app?

后端 未结 4 1161
难免孤独
难免孤独 2021-01-19 11:25

I was hoping to find something in the Android sdk similar to the javax.script package in Java; but haven\'t been able to find anything. Am I missing a way to e

4条回答
  •  遥遥无期
    2021-01-19 12:17

    You can execute JavaScript from within a WebView. Make sure you set WebSettings.setJavaScriptEnabled(true).

    You can find more information here.

提交回复
热议问题