{"id":3562,"url":"https://github.com/InstantWebP2P/node-android","last_synced_at":"2025-08-03T20:32:48.132Z","repository":{"id":19904519,"uuid":"23169798","full_name":"InstantWebP2P/node-android","owner":"InstantWebP2P","description":"Run Node.js on Android by rewrite Node.js in Java","archived":false,"fork":false,"pushed_at":"2023-07-12T03:02:56.000Z","size":19810,"stargazers_count":621,"open_issues_count":0,"forks_count":66,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-08-16T14:34:47.185Z","etag":null,"topics":["andriod","httpp","java","node-android","nodejs","p2p","p2p-http","rhino","udt"],"latest_commit_sha":null,"homepage":"https://instantwebp2p.github.io/node-android/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InstantWebP2P.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-08-21T01:19:15.000Z","updated_at":"2024-08-13T18:56:09.000Z","dependencies_parsed_at":"2024-01-02T21:45:51.573Z","dependency_job_id":null,"html_url":"https://github.com/InstantWebP2P/node-android","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InstantWebP2P%2Fnode-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InstantWebP2P%2Fnode-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InstantWebP2P%2Fnode-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InstantWebP2P%2Fnode-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InstantWebP2P","download_url":"https://codeload.github.com/InstantWebP2P/node-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567009,"owners_count":17937983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andriod","httpp","java","node-android","nodejs","p2p","p2p-http","rhino","udt"],"created_at":"2024-01-05T20:16:45.015Z","updated_at":"2024-12-07T05:30:40.743Z","avatar_url":"https://github.com/InstantWebP2P.png","language":"Java","readme":"node-android\n===============\n\n![Android CI](https://github.com/InstantWebP2P/node-android/workflows/Android%20CI/badge.svg)\n\nRun Node.js on Android by rewrite Node.js in  Java with the compatible API.\n\n\nthird-party: [libuvpp](https://github.com/InstantWebP2P/libuvpp), libuv-java JNI code by Oracle.\n\n\n### Build\n\n  Clone the code, open Android Studio (1.*) and import the project.\n  \n  For Eclipse ADT user, refer to [ADT branch](https://github.com/InstantWebP2P/node-android/tree/adt)\n\n\n### Javascript code injection\n\n```bash\n\u003e adb shell am start -a android.intent.action.VIEW -n com.iwebpp.nodeandroid/.MainActivity -e js \"var run = function () { return 'hello world'; } run();\"\n```\n  \n### Features\n\n* Node.js 0.10.x compatible API by rewrite NodeJS in Java\n* Multi-threading: run separate node context in Java thread\n* [libUV native support](https://github.com/InstantWebP2P/node-android/tree/master/app/src/main/java/com/iwebpp/libuvpp)\n* Timer, set/clear Timeout/Interval\n* EventEmitter\n* Stream\n* [HttpParser - Rewrite Http-parser.c in java](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/node/HttpParser.java)\n* HTTP\n* [HTTPP - Run Http over Udp](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/node/http/httpp.java)\n* TCP\n* [UDT - Udp Transport](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/node/net/UDT.java)\n* DNS\n* URL\n* IPv6\n* [NodeJS alike API](https://github.com/InstantWebP2P/node-android/tree/master/app/src/main/java/com/iwebpp/node)\n* [WebSocket, WebSocketServer](https://github.com/InstantWebP2P/node-android/tree/master/app/src/main/java/com/iwebpp/wspp)\n* Connect middleware\n* [Crypto: NaCL support, public box,secret box,signature/verify](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/crypto/TweetNaclFast.java)\n* [SecureWebSocket over NaCL](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/wspp/SecureWebSocket.java)\n* [NaCL Cert](https://github.com/InstantWebP2P/node-android/blob/master/app/src/main/java/com/iwebpp/crypto/NaclCert.java)\n\n\n### JS runtime\n\n* Rhino supported\n* Exposed node-android packages: com.iwebpp.node.http, com.iwebpp.node.stream, com.iwebpp.node.net, etc\n* Exposed node-android classes: com.iwebpp.node.EventEmitter2, com.iwebpp.node.Dns, com.iwebpp.node.Url, etc\n* Exposed node-android native context in JS standard scope as NodeCurrentContext alias NCC\n* Exposed Android API: android.util.Log\n* NodeJS compatible internal modules are available in JS standard scope\n* Exposed WebSocket classes: com.iwebpp.wspp.WebSocket, com.iwebpp.wspp.WebSocketServer\n\n### JS usage\n\n* In case Rhino, create class 'MyScript' extends from com.iwebpp.node.js.rhino.Host\n* Implement 'public String content()' in 'MyScript' to return user script\n* Execute JS engine in a separate Java Thread with 'MyScript.execute()'\n* When authoring script, please use NodeCurrentContext(alias NCC) in node-android API\n* [JS API usages details](https://github.com/InstantWebP2P/node-android/tree/master/app/src/main/java/com/iwebpp/node/js)\n\n\n### TODO\n\n* API doc, more demos\n* JS runtime CommonJS/AMD compliance\n\n\n### Support us\n\n* Welcome contributing on document, codes, tests and issues\n\n\u003cbr/\u003e\n### License\n\n(see LICENSE file)\n\nCopyright (c) 2014-present Tom Zhou(appnet.link@gmail.com)\n","funding_links":[],"categories":["Networking","Libraries","Java","Libs","库"],"sub_categories":["Networking","\u003cA NAME=\"Network\"\u003e\u003c/A\u003eNetwork","[](https://github.com/JStumpp/awesome-android/blob/master/readme.md#networking)网络"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInstantWebP2P%2Fnode-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FInstantWebP2P%2Fnode-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInstantWebP2P%2Fnode-android/lists"}