调用系统拍照后原留保的变量内容数据丢失
我在调用拍照前,先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;
}
} --------------------编程问答-------------------- if (uploadFile== null)return; --------------------编程问答-------------------- 顶上去 --------------------编程问答-------------------- --------------------编程问答--------------------
补充:移动开发 , Android