GDK图片意图卡在Tap上以接受 [英] GDK picture intent gets stuck on Tap to accept

查看:50
本文介绍了GDK图片意图卡在Tap上以接受的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我的Glass应用程序上的图片功能停止工作.昨天还好,但现在卡在了接受图片"上.我认为这可能与处理图片以及取景器的新方式(至少对我而言)有关.我在玻璃开发者网站上可以找到的东西已被弃用,无法正常工作.我的希望/信念是,新主意是去取景器然后拍照.我希望仍然使用glass方法,但是我知道android API camera方法.这是代码

Today the picture function on my Glass app stopped working. It was fine yesterday, but now it gets stuck on the Tap to Accept Picture. I think it may have something to do with the new (to me at least) way it handles pictures as well as the viewfinder. What I can find on the glass developers site is deprecated and doesn't work. My hope/belief is that the new idea is for the intent to go to the viewfinder and then take the picture. I'd prefer to still use the glass method, but I am aware of the android API camera method. Here's the code

startActivityForResult(new Intent(MediaStore.ACTION_IMAGE_CAPTURE), REQUEST_PIC);

和onActivityResult

and in onActivityResult

switch(requestCode)
        {
        case REQUEST_PIC:
                String picturePath = data.getStringExtra(Intents.EXTRA_PICTURE_FILE_PATH);
                processPictureWhenReady(picturePath);
                break;
        }

推荐答案

自升级到XE18.3以来,我遇到了同样的问题.我没有花时间寻找解决方法,而是使用SurfaceView实现了预览模式.您可以使用Camera.Open()直接访问相机,示例代码可在以下位置找到:(在页面中搜索"camerasample.zip")

I have got the same problem since upgraded to XE18.3. Instead of spending time to look for a workaround, I've implemented the preview mode with SurfaceView. You could access the camera directly with Camera.Open(), the sample codes can be found at: (search for "camerasample.zip" in the page)

https://code.google.com/p/google-glass-api/issues/detail?id = 351

希望这会有所帮助.

这篇关于GDK图片意图卡在Tap上以接受的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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