问题描述
我正在使用'的Andriod加工处理的LIB(即在处理2.0.3运行Android模式和空空它在我的设备)的应用程序的Andriod
I am making an andriod app using 'andriod for processing lib" of processing (ie. running android mode in processing 2.0.3 and lauching it on my device).
Spacebrew()是一个易于使用的网络套接字库进行处理也availabel如JavaScript。
Spacebrew (http://docs.spacebrew.cc) is a easy to use web socket library for processing , also availabel as javascript.
如果我的Andriod模式下运行spacebrew例如codeS,应用程序获取我的设备推出,但犯规在我spacebrew管理露面。而如果我在Mac上运行同样的事情,它正确地显示出来。想同时使用进行处理的AndriodWebSocket的通信不会发生。但是,这是使用网络套接字的最简单方法。因此,谁能帮我找出如何使加工spacebrew工作(机器人模式)
if i run the spacebrew example codes in andriod mode, the app gets launched in my device but doesnt show up in my spacebrew admin. whereas if i run the same thing in my mac, it shows up correctly. guess the websocket communication is not happening while using "andriod for processing". But this is the easiest way to use web sockets. So can anyone help me figure out on how to make spacebrew work in processing (android mode)
这是我的大学项目。关于如何得到这个运行,请有什么建议?三江源提前
this is for my college project. any suggestions on how to get this running please? thankyou in advance
推荐答案
感谢您指出我Spacebrew,不知道这种事的!
Thanks for pointing me to Spacebrew, didn't know about that!
我刚刚从Android的模式测试,它的工作,但有一个微小的怪癖,你可能会错过:权限!
I've just tested it from Android Mode and it does work, but there is a tiny quirk you might be missing out: permissions!
通常情况下,如果你的应用程序使用额外的权限,应用程序的清单,您可以使用这些。在处理,这也可以通过 Android和GT;素描权限
和Spacebrew的情况下,网络
是您需要启动权限,你可以看到如下:
Normally, if your app uses extra permissions, the application's manifest allows you to use these. In Processing, that's also possible via Android > Sketch Permissions
and in the case of Spacebrew, INTERNET
is the permission you need enabled, as you can see below:
我只是做了一个测试自己,似乎工作刚刚与的:
I just a did a test myself and it seems to work just fine with the amazon hosted demo:
注意Spacebrew处理库使用java的WebSocket库,但是只设置了一个WsClient客户端。你可以,如果你想在Android SDK的Eclipse项目中使用这个jar,让你的Android应用程序的行为作为WebSockets的服务器,以及,不只是一个客户端(以防万一,这将在未来的某个时刻成为方便的给你)
Note that the Spacebrew Processing library uses the java websocket library, but only sets up a WsClient client. You can if you want use this jar in an Android SDK eclipse project and have your Android app act as a websockets server as well, not just a client (just in case this will become handy to you at some point in the future)
这篇关于如何运行&QUOT'spacebrew'; Android的模式"从处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!