title: android acitvity flow
body: <p>i am developing an android app and this is one problem that i am facing: </p>
  
  <p>my main menu will pass an intent of image uri to another activity where it will display the image on the second activity. </p>
  
  <p>i process the intent to get the uri and convert it to the bitmap in the onStart() method(which i coded myself to override the super class method). 
  <strong>(is it correct to do so?)</strong></p>
  
  <p><strong>and where should i set the image onto the image view on the activity?</strong></p>
  
  <p>my problem is after processing the image, my app will forced closed. but if i remove the onStart() method, the second activity will come up with no error, but there will be no image to display(since i din process to display the image). </p>
  
  <p>when i use Log.d() method to show where my program stop, it does shows that the program run till after i process the intent and get the bitmap(where my program ends at the moment). </p>
  
  <p>here is the code of my onStrat() method:</p>
  
  <pre><code>    protected void onStart()
      {
  
          Bitmap newBitmap = null;
  
          Intent imageURI = getIntent();
          Log.d("HERE", "intent received");
  
          String imageLoc = imageURI.getExtras().getString("IMAGE_URI");
          Log.d("HERE", imageLoc);
  
          Uri imageLocation = Uri.parse(imageLoc);
          Log.d("HERE", "Uri reated");
  
          try 
          {
          newBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageLocation);
      } 
          catch (FileNotFoundException e) 
          {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } 
  
          catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
          Log.d("HERE", "bitmap created");
  
  
  }
  </code></pre>
  
  <p>i messed up something and finally found the solution. thanks for the async task info and it really did speed up my process. </p>
  
  <p>thank you.</p>