简体   繁体   中英

Android location aware chat application

I need help with this kind of application.I don't know how will two devices communicate over internet. I think I should create database to store users information, and then create sockets for communication. Is there a better way to do this?

  1. Most mobile networks use some form of NAT, so inbound connections to mobile devices are not possible. You'll need an intermediate server. P2P is possible, but to setup a connection you still need a server.

  2. Don't reinvent the wheel: there is already a lot of servers/libraries/protocols that do chat. Just pick one. Most notable one is XMPP, with open protocol, multiple free OSS server implementations and libraries (including Android).

  3. Additionally you can create your own server app, that does login/authentication and location-aware stuff. Once two users are authenticated and location-paired, you can hand-off the chat part to XMPP server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM