-
Notifications
You must be signed in to change notification settings - Fork 166
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
Support for Android #359
Comments
I built and made test evaluations of Node on my rooted android about a years ago in nodejs/node#1430. The test coverage were bad. To run tests, it needed to disable PIE to run python as nodejs/node#1396 (comment) and it is very hard to have such devices only for Node developments. Unless we have more better environments to develop Node on android, I think that it is hard to continue supporting. |
It was fun to do. Wanted a live synchronisation with JSON to push updated list. so a cart system is updated when someone else added a item to it. (say your family ). also for a practicall use try making a chat application with socket.io (works really nice allong).
http://socket.io/get-started/chat/ -> port open or a environment on the server side where you can control a node server. Look at the example and experiment!
|
In terms of building apps that use javascript for android there is https://cordova.apache.org/ and you can use things like socket.io in those applications. So my initial thinking is that use cases where Node would be used to support a server running on android as opposed to client applications would make a stronger case. |
I'll try to answer your questions:
I'm currently working on a multi-platform project that partly relies on Node. Since we want to use smartphones, android is unavoidable; so we built our application for Android (ARM & x86), and recompiled Node.js for Android. So I'm no expert, but I'm working on it =)
Not really. I'm hearing about stuff like Cordova & jxCore, but I don't think that many developers are using Node as-is in Android (because of the structure of an Android package, it's not intuitive to use node in "standard" Android packages, IMHO).
Not really.
I think it's worth investigating how developers can benefit of Node.js on mobile platforms, and what can the community & Node developers do about it. It's no random act that people talk more & more about Cordova & jxCore, though I have no idea of how those work. |
👍 for Android support. I can answer to the questions as well:
|
💯 @lamuertepeluda Agree on Jxcore direction. Jxcore did a very good integration with Android. node fs was able to read from APK. ping @obastemur ! I guess you have the most experience here. |
It was fun while it lasted but jxcore is no longer maintained. It would be rad if there were jxcore style android-ndk build facilities in nodejs mainline. The cordova plugin makes it easy to create a hybrid app that can connect to the in-process node/jxcore instance. For an example of a client-server application that runs locally you can checkout the decentralized app patchwork. I have been trying to compile that project for android with little success. 🙇 |
I've been using node on Android on Debian chroot as part of using a tablet for development instead of a laptop. That is, using node-based tools for compiling, inlining, uglifying and self-hosting from a terminal. Chroot is a royal pain to maintain, otherwise the usage and patterns repeat the pure naked Android nodejs patterns: terminal, localhost:XXXX, browser etc. The short-term practical production usage limitations are:
On the other hand, easy way of hosting servers on a commodity Android device will be a heaven's blessing for poor countries. Cheap smartphones become a prevalence even in poorest areas, and being able to run school's website from a $40 phone makes a big difference. |
I was able to build the node binary for android using the android-configure script in the main repo. You need to download the Android NDK and build from Linux. I used an Ubuntu 15 vm. It builds the node binary which can then be pushed to My work is available in this repo: https://github.com/gardner/ssband |
I am trying to make some efforts about this. nodejs/node#3098 landed just now and if you guys have other stuff that would be useful upstream, please feel free to give it a shout. I am collecting some info from your links in any case. Thanks! |
Should this remain open? If so, is there a label that might be useful to add such as |
FYI I only closed this because there's been no movement. If someone wants to pick this up and figure out a path to better Android support then by all means reopen it or open a new issue. |
I'm not part of the core group here. In my experience the first ticket to bring up an issue is left open so duplicates can be closed. Since this is the first issue that was logged to track android support, new github issues are closed by referencing #359 as the issue that it duplicates. I understand keeping things tidy but it may be hard to close a new issue as a dup if the original issue that it is duplicating has been closed. That said, nodejs does build for Android. The
I guess that's kind of the point @Trott was making. If we leave it open then new folks can see it as a potential way to help. This was a pretty long comment for my very agnostic view on the matter. |
Case made |
I picked up this today; I would like to use node as a .so I can load into some android app.
I would think stddef should be able to find bits/c++config.h
nodejs/node#9707 referenced the same missing .h and there was a modification to add --force installing the standalone toolchain? (that didn't help) I might have missed some other thing that would fix this. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
@nodejs/build, @nodejs/testing and @nodejs/ctc please weigh in.
https://github.com/nodejs/node/search?q=android&type=Issues&utf8=%E2%9C%93 shows 48 issues and PRs referring to Android support in core. This is something that's not on our radar and mostly exists because there are people out there that keep patching it when it doesn't work properly and we just take their word for it.
Android as a target is interesting because there are an increasing number of devices and applications for Android in the wild. Many (most?) development boards support both Linux and Android, Android is being used in all sorts of new places for control and interface applications. Perhaps it's in our interests to start considering something closer to first-class support for it?
I haven't looked into any of the technicalities of this but it may be straightforward to get Android into our build system as a regular part of our test runs. Newer development boards mean that it shouldn't be too slow either (our ARMv7 and ARMv8 Linux targets run at competitive speeds atm and I'd expect the same performance).
So my questions for you all are:
The text was updated successfully, but these errors were encountered: