 <p>You should login your user again and only after that attach the file.I had similar situation when i took a picture using camera. I did this. Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivity(intent); CameraActivity was started and connection was lost, so you need to reconnect if you want to upload the file.</p>