@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(); } }
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; } }
/** @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); } }
public void debugWallPost() { for (WallPost wallpost : wallPosts.values()) { Log.err(wallpost.toString()); } }