GDK picture intent gets stuck on Tap to accept

2019-02-07 07:18发布

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);

and in onActivityResult

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

3条回答
我命由我不由天
2楼-- · 2019-02-07 08:13

This is a problem being experienced after the XE18.3 update. It has been logged in the google-glass-api issue tracker here.

You can try downgrading the firmware as mentioned in the comments, but be sure to note that doing that voids your warranty.

查看更多
Juvenile、少年°
3楼-- · 2019-02-07 08:19

I have the same issue happening to me as well, however if you plug Glass into your computer that is running Eclipse and the adb is running the Intent will complete successfully. This is not a solution but hopefully it'll keep you from getting behind in work until there is an answer available.

查看更多
何必那么认真
4楼-- · 2019-02-07 08:24

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

Hope this helps.

查看更多
登录 后发表回答