相机图像捕捉意图未能在Galaxy Tab的限量版返回 [英] Camera Image Capture Intent fails to return in Galaxy Tab Limited Edition

查看:186
本文介绍了相机图像捕捉意图未能在Galaxy Tab的限量版返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题了Galaxy Tab的限量版(谷歌I / O),当我打开相机白衣的意图。

I'm having problems with a Galaxy Tab Limited Edition ( Google I/O ) when I open the camera whit an Intent.

这是我的code:


Intent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new     
    File(mSavedFilePath)));
startActivityForResult(imageCaptureIntent, REQUEST_IMAGE_CAPTURE);

在一个摩托罗拉Xoom这个code是工作的罚款。 但在Galaxy Tab的10.1,我从来没有收到来自摄像机的应用程序的响应。

On a Motorola Xoom this code is working fine. But on Galaxy Tab 10.1, never I receive the response from the camera app.

我没有一个堆栈跟踪,因为我没有错误。

I haven't a stack trace because i haven't an error.

任何人有什么想法?

推荐答案

发动意图相机应用程序时,你并不需要相机许可。 然而,这是Android平台上的高度分散的过程。我已经有很多与它的问题。基本上,如果您检查发送到相机应用,额外的文件,你会发现,他的大小为0字节时的结果返回。这个bug存在于大量的Andr​​oid设备和你是一个解决方法,以固定大部分那就是当失败(这意味着有没有返回parceable额外的输出,如果它是那么多余的文件不创建或lenght 0那么就需要从象意图得到URI:intent.getData();这将返回一个URI到被基本形成方式相同的额外输出乌里所以可以事后使用相同的方法用于获得图像的文件

You don't need the camera permission when launching an intent to the camera app. However this is a highly fragmented process on the android platform. i have had a lot of issues with it. basically if you check the extra file that you sent to the camera app you will notice that his size is 0 bytes when the result returns. this bug exists in a lot of android devices and thee is a workaround to fixing most of it and that is when this fails (this means there is no parceable extra output returned and if it is then the extra file is not created or with lenght 0 then you need to get the Uri from the intent like: intent.getData(); this will return an uri to the file which is basically formed the same way as the Extra Output Uri so you can afterwards use the same approach for obtaining the image.

您会发现图像存储内的Media.Images供应商,并在相机目录和OFC的intent.getData()开放的指向那里。

You will notice the image is stored within the Media.Images provider and in the camera directory and ofc the intent.getData() Uri pointing in there.

希望这有助于。不要忘记投票。:D

Hope this helps. Don't forget to vote :D.

这篇关于相机图像捕捉意图未能在Galaxy Tab的限量版返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆