I am working on android project. My requirement is to store image from android gallery to remote mysql database. I am able to store the image into database by giving the image name in the code. But I want to store the selected image 开发者_开发知识库to database from gallery without mentioning the name of the image in the code. How can I do that? Please help me.....
Invoke the gallery by starting Activity for result:
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, IMAGE_PICK);
Described here in more detail: Get/pick an image from Android's built-in Gallery app programmatically
精彩评论