I'm working on Android game which is turn based, and I've chosen Nodejs for the server side. I've been exploring for about two weeks how to communicate from the Android client side to the Nodejs server. Is there any way to communicate between the two.
Kindly help me if any one have any experience with such a project.
You can intergrate NodeJS with Java using node-java.
You cannot run Node. js on Android, as these are unrelated things. Node. js runs on the server, while Android is the operating system.
Android JS framework lets you write android applications using JavaScript, HTML and CSS or React Native with Node. js support.
The power of Node. js into mobile applications. Its core component is a library - available for Android and iOS - that lets you add a Node. js background worker to any mobile app. It also includes plugins for React Native and Cordova.
There are lots of options for something like this depending on what your game requires for communicating between client and server. For instance looking up "TCP clients for android" here shows up answers like this. If fast updates are important between server and client then UDP is one option, if your game can cope with the loss of some packets in the middle.
Besides TCP/UDP you also have things like WebSockets for Android.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With