title: Android app reverts back to index page after taking a picture
body: <p>So i have this app i'm building and i'm a newbie to android apps. I am using phonegap to assist in making things easier. i used their example they have posted and when take the picture the app reverts back to the index page of my app instead of going to the page i want.</p>
  
  <p>what i would like to know is where do i modify the code to go to another page and display the picture i just took?</p>
  
  <p>here is some of my code:</p>
  
  <pre><code>    &lt;script src="phonegap-1.1.0.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;script type="text/javascript" charset="utf-8"&gt;
  
      var pictureSource;   // picture source
      var destinationType; // sets the format of returned value 
  
      // Wait for PhoneGap to connect with the device
      //
      document.addEventListener("deviceready",onDeviceReady,false);
  
      // PhoneGap is ready to be used!
      //
      function onDeviceReady() {
          pictureSource=navigator.camera.PictureSourceType;
          destinationType=navigator.camera.DestinationType;
      }
  
      // Called when a photo is successfully retrieved
      //
      function onPhotoDataSuccess(imageData) {
        // Uncomment to view the base64 encoded image data
        // console.log(imageData);
  
        // Get image handle
        //
        var smallImage = document.getElementById('smallImage');
  
        // Unhide image elements
        //
        smallImage.style.display = 'block';
  
        // Show the captured photo
        // The inline CSS rules are used to resize the image
        //
        smallImage.src = "data:image/jpeg;base64," + imageData;
      }
  
      // Called when a photo is successfully retrieved
      //
      function onPhotoURISuccess(imageURI) {
        // Uncomment to view the image file URI 
        // console.log(imageURI);
  
        // Get image handle
        //
        var largeImage = document.getElementById('largeImage');
  
        // Unhide image elements
        //
        largeImage.style.display = 'block';
  
        // Show the captured photo
        // The inline CSS rules are used to resize the image
        //
        largeImage.src = imageURI;
      }
  
      // A button will call this function
      //
      function capturePhoto() {
        // Take picture using device camera and retrieve image as base64-encoded string
        navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50 });
      }
  
      // A button will call this function
      //
      function capturePhotoEdit() {
        // Take picture using device camera, allow edit, and retrieve image as base64-encoded string  
        navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true }); 
      }
  
      // A button will call this function
      //
      function getPhoto(source) {
        // Retrieve image file location from specified source
        navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, 
          destinationType: destinationType.FILE_URI,
          sourceType: source });
      }
  
      // Called if something bad happens.
      // 
      function onFail(message) {
        alert('Failed because: ' + message);
      }
  
      &lt;/script&gt;
  &lt;body&gt;
  
  
  
  
  &lt;div data-role="page" id="option" data-theme="e"&gt;
  &lt;div data-role="header" data-theme="e"&gt;
  &lt;h2 class="longHeader ui-title"&gt;Wedding Registry Scanner&lt;/h2&gt;
  &lt;/div&gt;
  &lt;div data-role="controlgroup"&gt;
  &lt;div data-role="content" data-theme="d"&gt;
  &lt;a href="http://zxing.appspot.com/scan" data-role="button"&gt;&lt;img src="images/upc.png"&gt;&lt;/a&gt;
  &lt;a href="#" onclick="capturePhoto();" data-role="button"&gt;&lt;img src="images/camera.png"&gt;&lt;/a&gt;
  &lt;a href="manage.html" data-role="button"&gt;&lt;img src="images/list.png"&gt;&lt;/a&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;div data-role="footer" data-theme="e"&gt;
          &lt;h4 class="smallFont"&gt;Prejean IT Solutions 2011&amp;copy;&lt;/h4&gt;
  &lt;/div&gt;
  
  
  &lt;div data-role="page" id="capture" data-theme="e"&gt;
  &lt;div data-role="header" data-theme="e"&gt;
  &lt;h2 class="longHeader ui-title"&gt;Capture Photo&lt;/h2&gt;&lt;/div&gt;
  &lt;div data-role="content" data-theme="d"&gt;
  &lt;img style="display:none;width:60px;height:60px;" id="smallImage" src="" /&gt;
      &lt;img style="display:none;" id="largeImage" src="" /&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>EDIT:
  this is in my android manifest file.</p>
  
  <pre><code>&lt;activity android:name="reg.scanner.DroidGap" 
          android:label="@string/app_name" 
          android:configChanges="orientation|keyboardHidden"&gt; 
          &lt;intent-filter&gt; &lt;/intent-filter&gt; 
          &lt;/activity&gt;
  </code></pre>