JS/html Game to Android app without using webview

Viewed 133

I want to implement a js/HTML game into the android app, without using webview. basically I want to use javascript code as back end code and use android XML file for the frontend, I don't want to use HTML code as my frontend, can it be possible to do this without using webview ?

1 Answers

Yes it's possible, however if you do it from scratch, you will be reinventing the wheel, because that is what React native, NativeScript, and weex are doing.

Sn overview of how that is done, is establishing bridges between java and javascript, and controlling the ui from javascript. But there is no real advantage in doing so over using one of the battle tested production ready solutions that i just listed in the first paragraph

Related