Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: open fire xmpp

I want to make a small chat application in Android. For this i done steps mentioned in this following page

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

Its working fine if we enter gmail credentials like as :-

private final static String SERVER_HOST = "talk.google.com";
private final static int SERVER_PORT = 5222;
private final static String SERVICE_NAME = "gmail.com"; 
private final static String LOGIN = "[email protected]";
private final static String PASSWORD = "mypassword";

But i want to use my own server in place of gmail. I installed openfire in my system, and i am very fresher in openfire , please suggest me what entries should i do for above credential if i am using my own server.

If any query then please feel free to ask, i am always here.. Thank you in advance.

like image 364
Pushpendra Kuntal Avatar asked Oct 09 '22 06:10

Pushpendra Kuntal


1 Answers

server_host and login/service_name.

server_host is the server you connect to, login is <something> @ service_name, which should match the declared service name for you server (possibly matches server_host or last part of server_host)

so if your server is xmpp.example.com, changes are your entries should most likely be

SERVER_HOST = "xmpp.example.com"
SERVICE_NAME = "example.com"
LOGIN =  "[email protected]"

or

SERVER_HOST = "xmpp.example.com"
SERVICE_NAME = "xmpp.example.com"
LOGIN = "[email protected]"

and obviously, have the port match the port you run openfire on (5222 is the default value)

like image 159
njzk2 Avatar answered Oct 12 '22 01:10

njzk2