title: Upload Android image to php server error
body: <p>I am following the tutorial <a href="http://blog.sptechnolab.com/2011/03/09/android/android-upload-image-to-server/" rel="nofollow noreferrer">here</a> along with somebody's help request <a href="https://stackoverflow.com/questions/9987343/android-upload-image-to-server-using-base64">here</a>...</p>
  
  <p>I am very new to Java/Android programming, and I'm not exactly sure how to 'launch' this section of code.  In my AndroidManifest.xml I have it set as the first activity, assuming this would launch right when I started it:</p>
  
  <pre><code>    &lt;activity
          android:name=".UploadImage"
          android:label="@string/title_activity_starting_point" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>Unfortunately it doesn't work this way, because whenever I launch the app it automatically 'stops unexpectedly.'  Any other Java class that I put right here launches fine, so I assumed it was something in the code.  I'm just not sure where it needs to be for me  to get the code 'running', as every time I compile it the program crashes on my phone.</p>
  
  <p>LogCat says it is unable to resolve this line of code:</p>
  
  <pre><code>String image_str = Base64.encodeBase64String(byte_arr);
  // old code was String image_str = Base64.encodeBytes(byte_arr), 
  // but this didn't compile for me and a comment on another website 
  // said that encodeBase64String could replace it...apparently not?
  </code></pre>