嗨,我有一个图像是从andorid通过调用图像_capture 如何将其上传到Windows服务器?如何上传从android手机调用摄像头拍摄的图像?
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(intent, 0);
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_CANCELED) {
Toast toast = Toast.makeText(this,"camera cancelled", 10000);
toast.show();
return;
}
// lets check if we are really dealing with a picture
if (requestCode == 0 && resultCode == RESULT_OK)
{
Bundle extras = data.getExtras();
Bitmap b = (Bitmap) extras.get("data");
//setContentView(R.layout.main);
ImageView mImg;
mImg = (ImageView) findViewById(R.id.head);
mImg.setImageBitmap(b);
// save image to gallery
String timestamp = Long.toString(System.currentTimeMillis());
MediaStore.Images.Media.insertImage(getContentResolver(), b, timestamp, timestamp);
}
问题是什么?你要上传到哪里? – Fedor 2010-07-01 10:13:28
嗨,我有一个图像,这是从调用图像_capture从andorid如何将其上传到Windows服务器? – 2010-07-01 10:18:53