Best approach to create online game? [closed] - android

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have developed a simple card game based on Scopy.
Now I want to upgrade my application for 1 vs 1 online game.
I'm not new to Java, I know sockets.
I was wondering if there is a better way to start this work.
EDIT: it is a turn game, the players just exchange a string that represent a card.

I would do it with a RESTful webservice. To do it with a socket is too much in my opinion.
And with a RESTful webservice, you get an easy option to implement your game for other plattforms like iOS or WP.
best regards

If its a turn game, you don't necessary need socket, socket is meant for real time interaction. And its way easier to setup normal http request's than socket.
If you choose to go for socket, you will need a node.js server and there are some plugins for handling android socket connection. Basically these plugins create a listener that receive messages from server and run a callback (that you define) based on the name of the message.
Another way to go, thats not so pro, but its easier, is use GCM (android notification service) or parse.com. This way you skip the server setup, these apis basically run a node.js server and you can define some custom messages, then just handle the messages with a socket plugin like i said.
EDIT
Using GCM you can send messages directly from your device, using a internal (on device) java server. There are some examples in android official dev site.
By the way, you can implement socket without node.js too

Related

How to build a simple multi device chat application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I already knew the basic of android programming. now I want to build a offline multi-user chat application. I found peer-to-peer and Bluetooth are the most used techniques to communicate each other. I need to know,
Which one is easy to begin with among P2P and Bluetooth?
I already built a Bluetooth chat application using online tutorial. That method is a communicating between two endpoints. Is it possible to make it more than two?
Which one is easy to begin with among P2P and Bluetooth?
It depends on your previous skill and expertise. As I have seen that you have already managed to create an application for p2p communication via bluetooth, so of course it is easy to begin with bluetooth.
I already built a Bluetooth chat application using online tutorial.
That method is a communicating between two endpoints. Is it possible
to make it more than two?
Yes, it is possible. There are a lot of tutorials in the internet of connecting multiple bluetooth devices. Please check this SO answer.
However, chat application based on bluetooth is not a good approach. If this for your learning only, then from my point of view this is fine. If this is a professional project, then I would suggest you might consider looking into other options. Check this tutorial which uses Firebase as well. Using firebase for real time chat application will definitely serve your purpose.

Web app, android and ios. How to interface them all with a database [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm new to android and ios development. My question is pretty simple. I've got a basic ecommerce website and I need to create an app version of the website. I want to create two native apps. What's the best way to do it? How can I interact with the database on an android and ios app. (I wasn't able to find a complete answer on the internet, but if there's one please let me know and I will close this question immediately). Thank you
You need to create web services.
You can develop in java, PHP, etc.
The web services will receive requests from the mobile, get the data from the database and then send a response to the mobile. The mobile APPs will never interact with the server database, they will only make request to the web services and get responses.
To this the most common is to make REST calls with JSON.
In Android you can use Retrofit.
And in iOS you can use AFNetworking.
A good PHP example of how to develop your REST and JSON service you can find here.
You would need some API to access the data. You can use PHP, Java or C# to develop your own API's. The API will handle requests and return the required data. You Android client will connect to the API and perform Http requests. Check out this guide on how to perform Http requests: https://developer.android.com/training/volley/simple.html
You can also check this question for more info: I want to make a apps where people can upload their status,image or video what I need to know for this?

Crowdsourcing Android App Tech Tips needed [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
As part of my project I need to develop an android app. Most important responsibilities of the app includes :
Collect android mobile users' data (crowd sourcing )
Run the configured pre-processing algorithm on the data
Create a storage with the pre-processed data
Run knowledge and pattern detection algorithm
Control/Suggest the mobile system with the strategy the
above algorithm suggest
It's been only 3 weeks I am training myself android. I need professional tips
How to proceed further: I must provide cloud-assisted solution.
What would be suitable tools ? How Google play store provide access to data that
the users willing to provide ?
Help me out :)
I assume from what you say (please correct me if I am wrong) that this
configured pre-processing algorithm
will run on a server. And after the processing you will send data back to the android device.
One way that you could do this would be to send the data from the phone to a web server through an http request, the server will process the data and then send back the info through cloud messaging.
In case that the processing is done in the phone, then you can omit the last step and implement a one-way communication (sending http requests to the server).
For more details about sending data through http you can check here, and for cloud messaging you can check here.

How does Kakao Talk work? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been doing some research to create an IM application. I saw many sample codes and still trying to decide which method to use. Before starting development I want to ask your opinion if anybody knows how popular IM applications such as Kakao Talk, Line, We Chat, WhatsApp work.
I saw some articles saying to use Google Cloud, and some articles about using XMPP.
I am a kinda new for Android development and before starting development I want to see all my possibilities and choose best method for that.
Thanks for your time.
Well, I would presume they don't all work the same way. There are different techniques one can use to implement a chat client. Each of these companies might have their own proprietory technologies depending on their scale, user base, finances etc.
2 popular options you can check out are :
XMPP - It's supported by most major chat clients and is used by the likes of Facebook (a customized version of it anyway). asmack is a popular XMPP library for Android which might be useful to you.
A Backend-As-A-Service (BAAS) provider like Parse. This will save you a lot of server side heavy lifting and writing backend code like you would have to do if you were considering something like AWS
If this is a learning project, I would suggest implementing a very simple client and writing both the server and client-side code so that you know how the whole stack works. Hope that helps!

How to send a text from Android device to a computer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
We have a requirement wherein we want to send some text message from android powered device to a server in PC, when this message is recieved it will trigger some action in PC? How do I configure my device to listen to that server and are there any third party server which I need to use. I tried using one of our in-house servers to communicate from device to PC but not able to achieve. If anyone has achieved the same using any third party servers please share your comments and also any other settings which needs to be done in device.
If what you are looking for is to install some sort of client on the PC that can communicate with an Android app then there are a bunch of existing software packages such as what RemoteDroid offers. You can checkout the source code at http://code.google.com/p/remotedroid/source/checkout.
If the question is about only sending message from device to server then you can use http / tcp. If your server is in VPN then you may need take care of that. If you are looking for other way also (server to device) you can use cloud to device messaging.

Categories

Resources