Ejemplo n.º 1
0
 @Override
 public void onClick(View arg0) {
   if (TwitterManager.getInstance().getUser() != null) {
     Log.e(TAG, "logout");
     TwitterManager.getInstance().logout();
   } else {
     Log.e(TAG, "login");
     TwitterManager.getInstance().login();
   }
 }
Ejemplo n.º 2
0
 public Bitmap getImage(URL url) {
   try {
     //			Object content = url.getContent();
     //			InputStream is = (InputStream) content;
     InputStream is = (InputStream) url.openConnection().getInputStream();
     Bitmap b = BitmapFactory.decodeStream(is);
     is.close();
     return b;
   } catch (MalformedURLException e) {
     Log.printStackTrace(e);
     return null;
   } catch (IOException e) {
     Log.printStackTrace(e);
     return null;
   }
 }
Ejemplo n.º 3
0
 /** @param mPicUrl the mPicUrl to set */
 public void setPicUrl(String mPicUrl) {
   this.mPicUrl = mPicUrl;
   try {
     mPic = getImage(new URL(mPicUrl));
   } catch (MalformedURLException e) {
     Log.printStackTrace(e);
   }
 }
Ejemplo n.º 4
0
 public void debugWallPost() {
   for (WallPost wallpost : wallPosts.values()) {
     Log.err(wallpost.toString());
   }
 }