开发者

How to store the selected image from android gallery into remote database?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜