我在调用拍照前,先mUploadMessage进行了赋值,但调用系统拍照返回后,这个mUploadMessage 这个值没有了,变成null了,有没有什么办法解决一下。@Override
public void openFileChooser(ValueCallback<Uri> uploadFile) {
// TODO Auto-generated method stub
if (mUploadMessage != null)
return;
mUploadMessage = uploadFile;
aaaaaa();
}protected void aaaaaa() {
try {
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_WITH_DATA);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}@Override
protected void onActivityResult(int requestCode, int resultCode,Intent intent) {
switch (requestCode) {
// Choose a file from the file picker.
case CAMERA_WITH_DATA:
if (null == mUploadMessage)
break; 上面这里 mUploadMessage 就为空了,是什么原因? 说是调用系统拍照后会重至,那有什么办法可以解决一下??????? break;
}
}
public void openFileChooser(ValueCallback<Uri> uploadFile) {
// TODO Auto-generated method stub
if (mUploadMessage != null)
return;
mUploadMessage = uploadFile;
aaaaaa();
}protected void aaaaaa() {
try {
Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraIntent, CAMERA_WITH_DATA);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}@Override
protected void onActivityResult(int requestCode, int resultCode,Intent intent) {
switch (requestCode) {
// Choose a file from the file picker.
case CAMERA_WITH_DATA:
if (null == mUploadMessage)
break; 上面这里 mUploadMessage 就为空了,是什么原因? 说是调用系统拍照后会重至,那有什么办法可以解决一下??????? break;
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货