Advertisement
wandrake

Untitled

May 9th, 2011
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1. package com.testasmack;
  2.  
  3. import org.jivesoftware.smack.*;
  4.  
  5. import android.app.Activity;
  6. import android.os.Bundle;
  7. import android.util.Log;
  8.  
  9. public class Main extends Activity {
  10.     /** Called when the activity is first created. */
  11.     @Override
  12.     public void onCreate(Bundle savedInstanceState) {
  13.         super.onCreate(savedInstanceState);
  14.         Connection conn1;
  15.        
  16.         setContentView(R.layout.main);
  17.        
  18.         conn1 = new XMPPConnection("talk.google.com");
  19.        
  20.         try {
  21.             Log.w("Main", "fin qui tutto ok :D");
  22.             conn1.connect();
  23.             Log.w("Main", "fin qui tutto ok :D");
  24.             conn1.login("user", "pass");
  25.         } catch (Exception e) {
  26.             Log.w("Main", "oops, something was wrong");
  27.             Log.w("Main", e.getMessage());
  28.             Log.w("Main", e.toString());
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement