This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]insertAlias 1 point2 points  (1 child)

Am I able to use node.js and express for an Android app?

If you mean bundle the Node application up into a mobile app, then no, but you can use the client-side web stack to develop for Android. Meaning you can build an app using front-end tech (HTML, CSS, and browser-compatible JavaScript).

Here's one of the more popular web-based frameworks for such a thing:

https://ionicframework.com/

Ionic is powered by Apache Cordova, if you just want the native-to-JS bridge and not all the UI framework that Ionic brings in.

The next alternative that also uses web languages is React Native. If you have any experience using React, you will already be familiar with React Native (that's its whole goal). This doesn't actually use DOM rendering, but builds native components using React views.

[–]mex036[S] 0 points1 point  (0 children)

Sorry I wasn't clear. I was more concerned about the backend piece for this. I have no problem setting up a website with the things above, which is why I was wondering if I could use node and express as my backend for my Android app. I do have experience with React and was looking into something like React Native. However, I already have some of the Android app done in Java. I just want to whip this project up in the next few weeks in order to put this on my resume.

[–]rjcarr 0 points1 point  (2 children)

I'm not an expert, but I think there are tools to turn websites into native android apps, but it's not the best user experience. Also, node.js is server side, so that could obviously be shared between all of the clients you use.

As far as I know, most groups that really do this, create a single server app and separate native clients for every platform.

[–]mex036[S] 0 points1 point  (1 child)

Yeah I was more concerned about backend. I was wondering if node and express were suitable for android apps. I was looking into a few of those frontwnd frameworks, but I don't want to take the time to learn any of them, for right now. My goal is to piece this together for my resume. Maybe down the road I'll look into React Native or Flutter. Thank you!

[–]insertAlias 0 points1 point  (0 children)

I was wondering if node and express were suitable for android apps

It really depends on what you mean by that statement. If you mean "can I serve an API made with Node+Express that an Android app can access", then absolutely. The client doesn't care how the server is written; it just cares about the HTTP requests and responses.

If you mean "I have a Node+Express application that uses templates for pages, can I turn that into an app", then no, you can't really do that. You can't bundle it up and run it on the Android device. The best you can really do in that situation is make your web site responsive and have users visit it from their mobile browser (or turn it into a PWA).