被破坏prevent活动prevent

由网友(彼岸ㄨ)分享简介:I'm从我呼吁这样一个活动发送意图相机I´m sending an intent to the camera from an activity that I call like this:Intent testphoto = new Intent(Dashboard.this,CameraHandler.class)...

I'm从我呼吁这样一个活动发送意图相机

I´m sending an intent to the camera from an activity that I call like this:

 Intent testphoto = new Intent(Dashboard.this,CameraHandler.class);
 startActivity(testphoto);

在CameraHandler I类调用摄像头:

In the CameraHandler class I call the camera:

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); 
startActivityForResult(intent, 0);

但在此之前 onActivityResult 是所谓的camerahandler类中的活性被破坏。反正是有prevent呢?

But before onActivityResultis called in the camerahandler class the activity is destroyed. Is there anyway to prevent this?

找到了答案: 我在我的androidmanifest nohistory =真实的,所取得的结果之前的OS破坏活动。

FOUND THE ANSWER: I had in my androidmanifest nohistory=true and that made the OS destroy the activity before the result.

推荐答案

要确保你没有不保留活动开发者设置的,因为它会破坏你离开了活动。

Be sure you don't have the "Don't keep activities" Developer setting on, as it will destroy the activity you are leaving.

阅读全文

相关推荐

最新文章