// notify user that file has been uploaded
notification.finished();
} catch( Exception e ) {
Log.e(TAG, "exception: " + url, e);
// file upload failed so abort post and close connection
post.abort();
client.getConnectionManager().shutdown();
// get user preferences and number of retries for failed upload
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( context );
int maxRetries = Integer.valueOf( prefs.getString( "retries", "" ).substring( 1 ) );