Android Open Source - ThinkPageSDK_Android T P Weather Suggestions






From Project

Back to project page ThinkPageSDK_Android.

License

The source code is released under:

MIT License

If you think the Android project ThinkPageSDK_Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.thinkpage.sdk;
/*www  .j  av a2 s . c  o  m*/
import java.text.SimpleDateFormat;

import org.json.JSONException;
import org.json.JSONObject;

public class TPWeatherSuggestions 
{
  public TPWeatherSuggestions(JSONObject jsonResponse)
  {
    try
    {
      dressingBrief = jsonResponse.getJSONObject("dressing").getString("brief");
      dressingDetails = jsonResponse.getJSONObject("dressing").getString("details");

      uvBrief = jsonResponse.getJSONObject("uv").getString("brief");
      uvDetails = jsonResponse.getJSONObject("uv").getString("details");
      
      carwashBrief = jsonResponse.getJSONObject("car_washing").getString("brief");
      carwashDetails = jsonResponse.getJSONObject("car_washing").getString("details");
      
      travelBrief = jsonResponse.getJSONObject("travel").getString("brief");
      travelDetails = jsonResponse.getJSONObject("travel").getString("details");
      
      fluBrief = jsonResponse.getJSONObject("flu").getString("brief");
      fluDetails = jsonResponse.getJSONObject("flu").getString("details");
  
      sportBrief = jsonResponse.getJSONObject("sport").getString("brief");
      sportDetails = jsonResponse.getJSONObject("sport").getString("details");
    }
    catch (final JSONException ex) 
    {
    
    };      
  }
  public String dressingBrief;
  public String dressingDetails;

  /*!
   *
   * The brief and details of the UV suggestion
   **/
  public String uvBrief;
  public String uvDetails;

  /*!
   *
   * The brief and details of the car wash suggestion
   **/
  public String carwashBrief;
  public String carwashDetails;

  /*!
   *
   * The brief and details of the travel suggestion
   **/
  public String travelBrief;
  public String travelDetails;

  /*!
   *
   * The brief and details of the flu-prevention suggestion
   **/
  public String fluBrief;
  public String fluDetails;

  /*!
   *
   * The brief and detailed suggestions for outdoor sports
   **/
  public String sportBrief;
  public String sportDetails;
}




Java Source Code List

com.example.thinkpageandroid.MainActivity.java
com.loopj.android.http.AsyncHttpClient.java
com.loopj.android.http.AsyncHttpRequest.java
com.loopj.android.http.AsyncHttpResponseHandler.java
com.loopj.android.http.Base64DataException.java
com.loopj.android.http.Base64OutputStream.java
com.loopj.android.http.Base64.java
com.loopj.android.http.BaseJsonHttpResponseHandler.java
com.loopj.android.http.BinaryHttpResponseHandler.java
com.loopj.android.http.DataAsyncHttpResponseHandler.java
com.loopj.android.http.FileAsyncHttpResponseHandler.java
com.loopj.android.http.JsonHttpResponseHandler.java
com.loopj.android.http.JsonStreamerEntity.java
com.loopj.android.http.MySSLSocketFactory.java
com.loopj.android.http.PersistentCookieStore.java
com.loopj.android.http.PreemtiveAuthorizationHttpRequestInterceptor.java
com.loopj.android.http.RangeFileAsyncHttpResponseHandler.java
com.loopj.android.http.RequestHandle.java
com.loopj.android.http.RequestParams.java
com.loopj.android.http.ResponseHandlerInterface.java
com.loopj.android.http.RetryHandler.java
com.loopj.android.http.SerializableCookie.java
com.loopj.android.http.SimpleMultipartEntity.java
com.loopj.android.http.SyncHttpClient.java
com.loopj.android.http.TextHttpResponseHandler.java
com.thinkpage.sdk.TPAirQuality.java
com.thinkpage.sdk.TPCity.java
com.thinkpage.sdk.TPWeatherFuture.java
com.thinkpage.sdk.TPWeatherManagerDelegate.java
com.thinkpage.sdk.TPWeatherManager.java
com.thinkpage.sdk.TPWeatherNow.java
com.thinkpage.sdk.TPWeatherSuggestions.java
com.thinkpage.sdk.TPWeather.java