• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

google chat client with asmack API crashing...

tukarthik

Lurker
Apr 5, 2012
1
0
Hi
I am creating a simple app that will provide me the status(online/offline) of my friend in google chat. I use asmack API fot connecting to google. But, my application crashes the moment i click the GET STATUS button. Can u please help..? Following is the code...

Code:
XMPPConnection connection = new XMPPConnection("gmail.com");
        connection.connect();
        connection.login(editText1.getText().toString()+"@gmail.com",editText2.getText().toString());
        Roster roster = connection.getRoster();
        Presence p = roster.getPresence(editText3.getText().toString());
        if(p.getType()==Presence.Type.available){
            textView2.setText("Available");
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones