I want to create connection between app (in mobile device) and server.
Also it would be great to send some info at a time to app and that server would know if that info reached app.
Has anyone tried this?
I would appreciate for any information.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve tried that for iOS, actually it was an app that required synchronising several devices across a network.
To achieve what you want you need to use sockets. There are two kinds of sockets: TCP and UDP. These are protocols that run on the protocol OSI layer. Read more about TCP/IP stack here.
When you read all this you will understand why you need to use sockets, and specifically TCP sockets, which are the ones than can ensure delivery.
For iOS, I recommend using CocoaAsyncSocket, a third party library that substantially leverages the hassle of using sockets at a low level.
For Android I can’t tell you right away, but I’ve used java.net.socket in the past with success, but I’m sure a google search will point you in the right direction.