Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Roadmap] WelsonJS.Android (For mobile devices) #97

Open
gnh1201 opened this issue Dec 17, 2023 · 4 comments
Open

[Roadmap] WelsonJS.Android (For mobile devices) #97

gnh1201 opened this issue Dec 17, 2023 · 4 comments
Labels
roadmap A future plan

Comments

@gnh1201
Copy link
Owner

gnh1201 commented Dec 17, 2023

Summary

Since the inception of the WelsonJS project, there have been inquiries about whether a similar concept could be extended to systems beyond Windows, specifically targeting Android and iOS.

The demands from these users align with the coding conventions pursued by WelsonJS, aiming to minimize the software build process and predominantly perform tasks through scripting.

While there is currently no suitable candidate for the iOS environment, the most promising option for the Android environment is Mozilla Rhino (a Java-based JavaScript engine).

Here are some projects worth considering:

  • Mozilla Rhino: An implementation of a Java-based JS engine developed and distributed by Mozilla. It has relatively rich examples of integration with Android.
  • Chakracore: An open-source JS engine developed and distributed by Microsoft. The project includes information on porting the JS engine with Android NDK and supports iOS, making it a potential candidate for iOS in the future.
  • LiquidCore (formerly, AndroidJSCore)
  • Zipline (formerly, Duktape)
  • Nashorn
  • JsEvaluator: JsEvaluator may help you run JavaScript in an Android app and get the results. This is an alternative to evaluateJavascript method of the WebView. Supports Android version 4.0 (Ice Cream Sandwich) and newer.
  • (Added on January 5, 2024) Wine for Android: There is another option that differs from what was mentioned above. It is Wine for Android. While it seems possible to enable WSH by referencing the winetricks script on x86 machines, since Android primarily uses ARM architecture, you will need to refer to the Windows or ReactOS ARM build.
  • (Added on January 5, 2024) JavascriptCore (iOS): Read the article "Javascript and Swift"
  • (Added on April 22, 2024) We need to consider how to allow Android devices to act as HTTP servers to remotely execute JavaScript. In the past, there was a package called NanoHTTPD, but it has been discontinued. Recently, there are other packages available that allow the use of HTTP servlets. Check out: github.com/piotrpolak/android-http-server

Related links

@gnh1201 gnh1201 added the roadmap A future plan label Dec 17, 2023
@gnh1201 gnh1201 changed the title [Roadmap] WelsonJS.Android (or iOS) [Roadmap] WelsonJS.Android or mobile devices Dec 17, 2023
@gnh1201 gnh1201 changed the title [Roadmap] WelsonJS.Android or mobile devices [Roadmap] WelsonJS.Android (For mobile devices) Dec 17, 2023
@gnh1201
Copy link
Owner Author

gnh1201 commented Jan 5, 2024

(Added on January 5, 2024) Wine for Android: There is another option that differs from what was mentioned above. It is Wine for Android. While it seems possible to enable WSH by referencing the winetricks script on x86 machines, since Android primarily uses ARM architecture, you will need to refer to the Windows or ReactOS ARM build.

@gnh1201
Copy link
Owner Author

gnh1201 commented Jan 5, 2024

(Added on January 5, 2024) JavascriptCore (iOS): Read the article "Javascript and Swift"

@gnh1201
Copy link
Owner Author

gnh1201 commented Apr 22, 2024

(Added on April 22, 2024) We need to consider how to allow Android devices to act as HTTP servers to remotely execute JavaScript. In the past, there was a package called NanoHTTPD, but it has been discontinued. Recently, there are other packages available that allow the use of HTTP servlets. Check out: github.com/piotrpolak/android-http-server

@gnh1201 gnh1201 pinned this issue Apr 30, 2024
@undefinedDarkness
Copy link

https://developer.android.com/develop/ui/views/layout/webapps/jsengine

This seems like a nice way to do it, since it uses the system webview's implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
roadmap A future plan
Projects
None yet
Development

No branches or pull requests

2 participants