我是Google App Engine(GAE)和Glassware开发(Google Glass)的新手.
我配置了mirror-quickstart-java项目,Netbeans并且Apache tomcat我成功运行了该项目,但我遇到了麻烦.
我的要求是,我不想使用谷歌应用程序引擎来开发我自己的Glassware,因为我想使用很少的第三方API.app引擎也不支持javax.imageio和BufferedImageapis.
我有以下问题
app-engine进行mirror-quickstart-java/Glassware开发?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 Glass镜像API上的视频路线图是什么?API是否允许将流视频传输到设备或从设备流式传输,如玻璃演示视频http://www.youtube.com/watch?v=v1uyQZNg2vE所示?
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?
我想向用户阅读一些文本,就像在Mirror API中可能的那样.这可能是通过Intent在Google Glass GDK中实现的吗?
我想用谷歌眼镜做的很简单:创建/显示谷歌玻璃的世界卡
问题是::
当我添加这个:
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)
我觉得我错过了一些简单/设置问题/不确定它是什么.
有什么建议吗?
在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
我正在尝试使用以下代码发送从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上有一个应用程序拍照,然后将其转换为灰度并覆盖内存中的原始图像:
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)