制作从无到有的Andr​​oid聊天应用程序

制作从无到有的Andr​​oid聊天应用程序

本文介绍了制作从无到有的Andr​​oid聊天应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为Android的聊天应用程序。我想用PHP脚本来实现聊天应用。基本思路是,以发送短信形式的Andr​​oid客户端PHP脚本和利用PHP脚本发送邮件到MySQL数据库。这些信息将被广播给其他人。但问题是自动广播消息给其他人。有没有办法做到这一点使用Android和PHP?

I need to make chat application for android. I thought of using PHP script to implement the chat application. Basic idea is to send message form android client to PHP script and making use of PHP script send the messages to the MySQL database. These messages will be broadcasting to other people. But the problem is auto broadcasting messages to other people. Is there a way to do this using android and php?

推荐答案

您可以执行以下

  • 请您的设备和PHP服务器

  • Make a persistent tcp connection between your device and the PHP server

在一个信息广播它在每个设备的TCP连接发送

When a message is broadcast send it over the tcp connection of each device

在设备工艺此通知,你是好去。

On the device process this notification and you are good to go.

如果你想使用Java在服务器端我已经在你的项目完成并准备运送;)(开个玩笑)

If you want to use Java on the server side I have your project already finished and ready to ship ;) (just kidding)

但是,如果你有兴趣看看OpenMobster移动云平台的设备到设备的消息框架。该项目是免费的,开源的。这里是一个链接到设备到设备框架:的http:// code.google.com / P / openmobster /维基/ D2DPushFramework

But if you are interested check out the Device-To-Device messaging framework of OpenMobster Mobile Cloud platform. The project is free and open source. Here is a link to the Device-To-Device Framework: http://code.google.com/p/openmobster/wiki/D2DPushFramework

HTTP://$c$c.google.com/p / openmobster /维基/ PushFramework

以上三个步骤已经采取了由框架照顾。开发商只是把重点放在应用程序本身

The above three steps are already taken care of by the framework. The developer just has to focus on the App itself

祝你好运!!!!

这篇关于制作从无到有的Andr​​oid聊天应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 13:43