3

I am developing Android Application for Chat between two users as private session.

Android application would be Android 2.0 and above .
If any user wants to chat then he can enter any email to chat and session between two users will be private and can able to store in database.
Other user should not be able to watch the private sesion.
if any one answer about android application where it will be connected to web server (php) then good for me to understand .
So if any one known the develpoment flow please suggest here .

Please don't suggest about IRC Chat where all user combined in same open template.

Rizvan
  • 2,335
  • 2
  • 23
  • 42
  • Check out XMPP and for example asmack library. There are loads of tutorials about that. And why not irc? You can have private chats in irc as well. – David Olsson Mar 14 '12 at 08:03
  • @DavidOlsson can u give any link or info that i can get sample source – Rizvan Mar 14 '12 at 08:04
  • @DavidOlsson this application like when some user get credit he will able to chat with anyother user in private session this what i mean here – Rizvan Mar 14 '12 at 08:06
  • moved it out to an answer with some links. – David Olsson Mar 14 '12 at 08:08
  • @DavidOlsson one more thing what u given XMPP that can be only available for gmail user not others then i can't do the things for other users – Rizvan Mar 14 '12 at 08:11
  • can't say I understand your question. If you set up the server yourself you can let anyone chat. Just use the credit system and user database using for instance php. GTalk uses XMPP and the example is for GTalk/Gmail but XMPP is just a chat standard. Run your own server and everyone can chat. – David Olsson Mar 14 '12 at 08:13
  • Tintin, I gave you an answer. If you don't like it, fine. But people will not do your work for you. You can solve the problem with the answer I gave you. That is, set up an xmpp server (you don't need Gmail) with users and use asmack. Probably the easiest way and also the cleanest way. – David Olsson Mar 30 '12 at 10:50
  • @DavidOlsson Problem is i'm not getting asmack n chat is difficult for me to do by asmack . so i want to connect to my server also . – Rizvan Mar 30 '12 at 11:00
  • You run an xmpp server on your on server, not sure what the problem is with the server? Just set it up with appropriate ports and run for instance Open Fire which has good documentation and you can follow the asmack guide I gave you but with your own data. – David Olsson Mar 30 '12 at 11:14

4 Answers4

4

You could use an XMPP server and use for instance asmack library for android.

Tutorials about the android application: http://davanum.wordpress.com/2007/12/31/android-just-use-smack-api-for-xmpp/

There are several different servers out there. For instance OpenFire. http://www.igniterealtime.org/projects/openfire/

David Olsson
  • 8,085
  • 3
  • 30
  • 38
2

This is link for Chat application for Android for private session and best suitable for users who want to use web with android . where any user can be signup or signin then get friends list with access of database to android and easily send messages to friends in a private session can chat unlimted . this feature more include like sending request and accepting/rejecting request .

Rizvan
  • 2,335
  • 2
  • 23
  • 42
2

If sounds like what you want is an XMPP server with client to client encryption.

Here are a list of XMPP server options: http://xmpp.org/xmpp-software/servers/

Here is a discussion on various XMPP libraries to use with Android: Android and XMPP: Currently available solutions

As for the encryption, it looks like you want to mimic what OTR does (for pidgin). The description of how the protocol works is posted here: http://www.cypherpunks.ca/otr/Protocol-v2-3.1.0.html

You can also grab their source code from here: http://www.cypherpunks.ca/otr/index.php#downloads (warning: code is written in C)

Community
  • 1
  • 1
Tom
  • 3,031
  • 1
  • 25
  • 33
1

You can do this in node.js very easily and if you need already implemented code then you can use this https://github.com/heroic/node-private-chat.

If you find it insufficient then you can easily extend it with very minimal efforts and don't use php for it. It isn't design for these type of work. Node is best suitable for it. Just run above code and connect to it with your android application.

Best Deepak

Deepak
  • 370
  • 2
  • 4
  • 12