title: Having log errors while launching activities using intents
body: <h2>I am trying to launch a new activity by passing intents as data</h2>
  <ul>
  <li><strong>I have posted the log</strong></li>
  <li><strong>How to resolve the errors</strong></li>
  </ul>
  <hr />
  <p><strong>RatingDescriptionFilterActivity.java</strong></p>
  <pre><code>public class RatingDescriptionFilterActivity extends Activity {
      // Declare Variables
      JSONObject jsonobject;
      JSONArray jsonarray;
      ListView listview;
      ListViewAdapter adapter;
      ProgressDialog mProgressDialog;
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; arraylist;
      static String NAME = &quot;rank&quot;;
      static String TYPE = &quot;country&quot;;
      static String DISTANCE = &quot;distance&quot;;
      static String RATING = &quot;rating&quot;;
      static String FLAG = &quot;flag&quot;;
      
      private String url = &quot;----------------- url----------&quot;;
  
      String TYPE_FILTER;
      String PRICE_FILTER;
      String RATE_FILTER;
      String DISTANCE_FILTER;
      
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          // Get the view from listview_main.xml
          setContentView(R.layout.listview_main);
          
          //Bundle extras = getIntent().getExtras();
          
          TYPE_FILTER = getIntent().getStringExtra(&quot;REST1&quot;);
          PRICE_FILTER = getIntent().getStringExtra(&quot;PriceBar&quot;);
          RATE_FILTER = getIntent().getStringExtra(&quot;DistanceBar&quot;);
          DISTANCE_FILTER = getIntent().getStringExtra(&quot;RatingBar&quot;);
          
          
          
  
          // Locate the listview in listview_main.xml
          listview = (ListView) findViewById(R.id.listview);
          
          // Execute DownloadJSON AsyncTask
          new DownloadJSON().execute();
      }
  
      // DownloadJSON AsyncTask
      private class DownloadJSON extends AsyncTask&lt;Void, Void, Void&gt; {
  
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              // Create a progressdialog
              mProgressDialog = new ProgressDialog(RatingDescriptionFilterActivity.this);
              // Set progressdialog title
              //mProgressDialog.setTitle(&quot;Fetching the information&quot;);
              // Set progressdialog message
              mProgressDialog.setMessage(&quot;Loading...&quot;);
              mProgressDialog.setIndeterminate(false);
              // Show progressdialog
              mProgressDialog.show();
          }
  
          @Override
          protected Void doInBackground(Void... params) {
              // Create an array
              arraylist = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
              // Retrieve JSON Objects from the given URL address
              
              
              String newurl = &quot;?&quot; + &quot;Key=&quot; + DISTANCE_FILTER.trim() + &quot;&amp;Key1=&quot; + RATE_FILTER.trim() + &quot;&amp;Key2=&quot; + PRICE_FILTER.trim() + &quot;&amp;Key3=&quot; + TYPE_FILTER.trim();
  
              Log.i (&quot;newurl&quot;, newurl.toString ());
              jsonobject = JSONfunctions.getJSONfromURL(&quot;------------url-----------&quot;+newurl);
  
              Log.i (&quot;jsonobject&quot;, jsonobject.toString ());
              try {
                  // Locate the array name in JSON
                  jsonarray = jsonobject.getJSONArray(&quot;restaurants&quot;);
  
                  for (int i = 0; i &lt; jsonarray.length(); i++) {
                      HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
                      jsonobject = jsonarray.getJSONObject(i);
                      // Retrive JSON Objects
                      map.put(RatingDescriptionActivity.NAME, jsonobject.getString(&quot;restaurantNAME&quot;));
                      map.put(RatingDescriptionActivity.TYPE, jsonobject.getString(&quot;restaurantTYPE&quot;));
                      map.put(RatingDescriptionActivity.FLAG, &quot;-----url-----&quot;+jsonobject.getString(&quot;restaurantIMAGE&quot;));
                      map.put(RatingDescriptionActivity.DISTANCE, jsonobject.getString(&quot;restaurantDISTANCE&quot;));
                      map.put(RatingDescriptionActivity.RATING, jsonobject.getString(&quot;restaurantRATING&quot;));
                      map.put(RatingDescriptionActivity.PRICE, jsonobject.getString(&quot;restaurantPrice&quot;));
                      
                      
                      
                      // Set the JSON Objects into the array
                      arraylist.add(map);
                  }
              } catch (JSONException e) {
                  Log.e(&quot;Error&quot;, e.getMessage());
                  e.printStackTrace();
              }
              return null;
          }
  
          @Override
          protected void onPostExecute(Void args) {
              // Pass the results into ListViewAdapter.java
              adapter = new ListViewAdapter(RatingDescriptionFilterActivity.this, arraylist);
              // Set the adapter to the ListView
              listview.setAdapter(adapter);
              // Close the progressdialog
              mProgressDialog.dismiss();
          }
      }
  }
  </code></pre>
  <p><strong>Log</strong>::</p>
  <pre><code>        10-21 17:55:46.756: E/AndroidRuntime(1061): FATAL EXCEPTION: AsyncTask #2
  10-21 17:55:46.756: E/AndroidRuntime(1061): java.lang.RuntimeException: An error occured while executing doInBackground()
  10-21 17:55:46.756: E/AndroidRuntime(1061):     at android.os.AsyncTask$3.done(AsyncTask.java:200)
  10-21 17:55:46.756: E/AndroidRuntime(1061):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
  10-21 17:55:46.756: E/AndroidRuntime(1061):     at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
  10-21 17:55:46.756: E/AndroidRuntime(1061):     at 
  </code></pre>
  <hr />
  <p><strong>line is</strong> <code>RatingDescriptionFilterActivity.java:87</code> <strong>is</strong></p>
  <p><code>String newurl = &quot;?&quot; + &quot;Key=&quot; + DISTANCE_FILTER.trim() + &quot;&amp;Key1=&quot; + RATE_FILTER.trim() + &quot;&amp;Key2=&quot; + PRICE_FILTER.trim() + &quot;&amp;Key3=&quot; + TYPE_FILTER.trim();</code></p>
  <p>Problem is arising in getting the value from seek bars in <code>filters.java</code></p>
  <p>How to debug the errors</p>