0

I am able to take picture in my android application and i am able to get its path too. Now after clicking that picture, i have created a button called "upload image" which when clicked should upload that image as a BLOB object in an external database hosted online.

I am unable to do that. Can anyone help me in this.

This is the code i am taking for getting the path of the image to be uploaded:

String filePath =
        Environment.getExternalStorageDirectory() +"/your_image_name.jpeg";
File file = new File(filePath);
Uri output = Uri.fromFile(file);
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, output);
ligi
  • 39,001
  • 44
  • 144
  • 244
Prakhar
  • 530
  • 10
  • 24

1 Answers1

0

To upload a image to the server, it is highly recommended to use web services. This is explained with a neat example in the this link . Recommend you to refer the steps provided in the link to proceed working on your project.

Community
  • 1
  • 1
BDRSuite
  • 1,594
  • 1
  • 10
  • 15