🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to perform communication between an android app in java and a game/server plugin

Started by
1 comment, last by frob 4 years, 3 months ago

I'm developing an application for Android in java (Android Studio), and I need to receive some information from a server plugin that is in C ++, the information I need to receive is the position of the player and its respective id, as I can send this information for java in C ++ and in real time?

Advertisement

This is not an AI question, moving this topic to General Programming, although it might go under Networking.

When you say it is from “a server plugin", do you mean across the network?

Communications within your program to itself should be instant. Communication between Java code and native C++ code is direct. There may be an abstraction layer through the Java Native Interface (JNI), but typically the code can access the bytes in memory directly. It will be “in real time” as you put it.

If the data you need is across a network, where your “server plugin” needs to communicate across a wire, there will be some time for the request to be made across the network, for the opposite side to respond with the data, and the time for the response to travel back across the network. How long that takes is up to the systems involved; across a local network it may be milliseconds, across some systems it may be much longer.

This topic is closed to new replies.

Advertisement