标签: google-glass

找不到API包'urlfetch'或调用'Fetch()'

我是Google App Engine(GAE)和Glassware开发(Google Glass)的新手.

我配置了mirror-quickstart-java项目,Netbeans并且Apache tomcat我成功运行了该项目,但我遇到了麻烦.

我的要求是,我不想使用谷歌应用程序引擎来开发我自己的Glassware,因为我想使用很少的第三方API.app引擎也不支持javax.imageioBufferedImageapis.

我有以下问题

  1. 是否必须使用Google app-engine进行mirror-quickstart-java/Glassware开发?
  2. 如果没有,我在交换访问令牌时"允许访问"步骤后收到以下错误.
message The API package 'urlfetch' or call 'Fetch()' was not found.

description The server encountered an internal error that prevented it from fulfilling this request.

com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'urlfetch' or call 'Fetch()' was not found.
    com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:100)
    com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:38)
    com.google.api.client.extensions.appengine.http.UrlFetchRequest.execute(UrlFetchRequest.java:75)
    com.google.api.client.http.HttpRequest.execute(HttpRequest.java:980)
    com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:299)
    com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:175)
    com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:78)
    com.google.glassware.AuthServlet.doGet(AuthServlet.java:56)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
Run Code Online (Sandbox Code Playgroud)

google-app-engine google-glass google-mirror-api

7
推荐指数
1
解决办法
2551
查看次数

任何人都可以建议谷歌玻璃教程的良好链接?

我试图搜索,但找不到一个解释一切的好的,我发现的链接只提供了一些代码片段.

google-glass

7
推荐指数
1
解决办法
2449
查看次数

如何使用Google Glass扫描二维码?

我想创建一个Google Glass应用程序,我想在其中扫描QR码.

我经历过这篇文章,但我无法理解.

阅读二维码

任何人都可以指导我如何扫描二维码并在谷歌眼镜中获取其内容.

谢谢

google-glass google-gdk

7
推荐指数
1
解决办法
1万
查看次数

Google Mirror API视频

Google Glass镜像API上的视频路线图是什么?API是否允许将流视频传输到设备或从设备流式传输,如玻璃演示视频http://www.youtube.com/watch?v=v1uyQZNg2vE所示

google-glass google-mirror-api

6
推荐指数
1
解决办法
1210
查看次数

How do I add the "View Website" action to a timeline card?

As of firmware update XE7, Glass adds a "View Website" action to search results. How do I add this action to my own timeline cards, such that it will open the Glass Browser with an arbitrary URL?

google-glass google-mirror-api

6
推荐指数
1
解决办法
271
查看次数

在GDK中是否存在READ_ALOUD操作的Intent?

我想向用户阅读一些文本,就像在Mirror API中可能的那样.这可能是通过Intent在Google Glass GDK中实现的吗?

google-glass google-gdk

6
推荐指数
1
解决办法
650
查看次数

Android Studio || GDK'你好'字'|| 导入com.google.android.glass.app.Card || 无法解析符号'google'

我想用谷歌眼镜做的很简单:创建/显示谷歌玻璃的世界卡

问题是::

当我添加这个:

import com.google.android.glass.app.Card
Run Code Online (Sandbox Code Playgroud)

我明白这个:

Cannot Resolve Symbol 'google'
Run Code Online (Sandbox Code Playgroud)

我这样做:

最小和目标SDK版本:15(只有一个Glass版本,因此最小和目标SDK是相同的.)编译:Glass Development Kit Sneak Peek

并且我对gradel.build进行了更改[编译sdk版本...它是15 /更改为以下内容]

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Sneak Peek:15"
    buildToolsVersion "19.0.0"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 15
    }
}
Run Code Online (Sandbox Code Playgroud)

我觉得我错过了一些简单/设置问题/不确定它是什么.

有什么建议吗?

android google-glass android-studio

6
推荐指数
3
解决办法
6626
查看次数

TWO_SWIPE_DOWN TAP无法捕获Google Glass GDK(XE16)

在Google Glass XE16中,GestureDetector可以检测多种手势,如LONG_PRESS,SWIPE_DOWN,THREE_LONG_PRESS,TWO_SWIPE_DOWN,TWO_TAP和其他一些手势.

在玻璃中TWO_SWIPE_DOWN就像取消所有内容并转到黑屏的快捷方式选项.在黑色屏幕之后它出现"ok glass".

但我需要覆盖TWO_SWIPE_DOWN TAP,以便用户不能以这种方式离开应用程序.我想在点击TWO_SWIPE_DOWN时显示用户特定的消息.

我的代码遵循以下GDK Touch Gestures:

    gestureDetector.setBaseListener(new GestureDetector.BaseListener() {
        @Override
        public boolean onGesture(Gesture gesture) {
            if (gesture == Gesture.TAP) {
                return true;
            } else if (gesture == Gesture.TWO_TAP) {
                return true;
            } else if (gesture == Gesture.SWIPE_RIGHT) {
                return true;
            } else if (gesture == Gesture.SWIPE_LEFT) {
                return true;
            } else if (gesture == Gesture.TWO_SWIPE_DOWN) {
                Log.i("Checking the TAPPING of TWO_SWIPE_DOWN", "Its working fine.");
                return true;
            }
            return …
Run Code Online (Sandbox Code Playgroud)

android gesture-recognition gestures google-glass android-4.4-kitkat

6
推荐指数
1
解决办法
383
查看次数

如何通过Glass发送电子邮件

我正在尝试使用以下代码发送从Glass获取的图像...

Intent emailIntent = new Intent( android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[] {     
    "xyz@gmail.com" });
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "My image attached");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageLocation));
startActivity(Intent.createChooser(emailIntent, "Send mail..."));
Run Code Online (Sandbox Code Playgroud)

但我得到"没有应用程序可以执行此操作".我相信Glass没有这样的意图.任何人都可以提供备用解决方案,以便我可以通过Glass发送电子邮件.

google-glass google-gdk

6
推荐指数
1
解决办法
489
查看次数

为什么保存位图需要这么长时间?

所以我在Google Glass上有一个应用程序拍照,然后将其转换为灰度并覆盖内存中的原始图像:

private void rGBProcessing (final String picturePath, Mat image) {
//BitmapFactory Creates Bitmap objects from various sources,
//including files, streams, and byte-arrays
    Bitmap myBitmapPic = BitmapFactory.decodeFile(picturePath);
    image = new Mat(myBitmapPic.getWidth(), myBitmapPic.getHeight(), CvType.CV_8UC4);
    Mat imageTwo = new Mat(myBitmapPic.getWidth(), myBitmapPic.getHeight(), CvType.CV_8UC1);
    Utils.bitmapToMat(myBitmapPic, image);
    Imgproc.cvtColor(image, imageTwo, Imgproc.COLOR_RGBA2GRAY);
    Utils.matToBitmap(imageTwo, myBitmapPic);

    FileOutputStream out = null;
    try {
        out = new FileOutputStream(picturePath);
        myBitmapPic.compress(Bitmap.CompressFormat.PNG, 100, out); 
    // PNG is a lossless format, the compression factor (100) is ignored
    } catch (Exception e) {
        e.printStackTrace();
    } finally …
Run Code Online (Sandbox Code Playgroud)

android fileoutputstream google-glass google-gdk

6
推荐指数
1
解决办法
4615
查看次数