コード例 #1
0
 private Document getDocument(String woeid) {
   try {
     boolean celcius = WeatherPrefs.getUseCelcius(getApplicationContext());
     String urlWithDegreeUnit;
     if (celcius) {
       urlWithDegreeUnit = URL_YAHOO_API_WEATHER + "c";
     } else {
       urlWithDegreeUnit = URL_YAHOO_API_WEATHER + "f";
     }
     return httpRetriever.getDocumentFromURL(String.format(urlWithDegreeUnit, woeid));
   } catch (IOException e) {
     Log.e(TAG, e.toString());
   }
   return null;
 }
コード例 #2
0
  public ArrayList<SocialEntry> retrieveSocialFeed(String url, Context context) {

    String response = httpRetriever.retrieve(url, context);
    return xmlParser.parseSocialFeedResponse(response);
  }