Search in sources :

Example 16 with WeiboException

use of org.qii.weiciyuan.support.error.WeiboException in project weiciyuan by qii.

the class MainFriendsTimeLineDao method getGSONMsgList.

public MessageListBean getGSONMsgList() throws WeiboException {
    String json = getMsgListJson();
    Gson gson = new Gson();
    MessageListBean value = null;
    try {
        value = gson.fromJson(json, MessageListBean.class);
    } catch (JsonSyntaxException e) {
        AppLogger.e(e.getMessage());
        throw new WeiboException(e.getMessage());
    }
    if (value != null && value.getItemList().size() > 0) {
        TimeLineUtility.filterMessage(value);
        TimeLineUtility.filterHomeTimeLineSinaWeiboAd(value);
    }
    return value;
}
Also used : JsonSyntaxException(com.google.gson.JsonSyntaxException) WeiboException(org.qii.weiciyuan.support.error.WeiboException) MessageListBean(org.qii.weiciyuan.bean.MessageListBean) Gson(com.google.gson.Gson)

Aggregations

WeiboException (org.qii.weiciyuan.support.error.WeiboException)16 GlobalContext (org.qii.weiciyuan.support.utils.GlobalContext)10 IOException (java.io.IOException)6 InterruptedIOException (java.io.InterruptedIOException)6 ClearUnreadDao (org.qii.weiciyuan.dao.unread.ClearUnreadDao)5 Notification (android.app.Notification)4 PendingIntent (android.app.PendingIntent)4 Context (android.content.Context)4 Intent (android.content.Intent)4 IntentFilter (android.content.IntentFilter)4 FileInputStream (java.io.FileInputStream)4 BroadcastReceiver (android.content.BroadcastReceiver)3 BufferedInputStream (java.io.BufferedInputStream)3 InputStream (java.io.InputStream)3 Proxy (java.net.Proxy)3 URL (java.net.URL)3 GZIPInputStream (java.util.zip.GZIPInputStream)3 BufferedReader (java.io.BufferedReader)2 InputStreamReader (java.io.InputStreamReader)2 HttpURLConnection (java.net.HttpURLConnection)2