HelloIOIO vs HelloIOIOPower

182 views
Skip to first unread message

Rajan Gupta

unread,
Jan 4, 2012, 8:45:03 AM1/4/12
to ioio-...@googlegroups.com
Hi All,

HelloIOIOPower code mentions following statement:
---------------------------------------------------------------------------------------
* Compared to the HelloIOIO example, this example does not use the
 * AbstractIOIOActivity utility class, thus has finer control of thread creation
 * and IOIO-connection process. For a simpler use cases, see the HelloIOIO
 * example.
---------------------------------------------------------------------------------------

In what way is HellIOIOPower superior in IOIO Connection Process. I feel, the same thing is being done for HelloIOIO code also, in one of the API libraries for the connection process.

Regards,
Rajan

Ytai Ben-Tsvi

unread,
Jan 4, 2012, 12:43:58 PM1/4/12
to ioio-...@googlegroups.com

When I first wrote HelloIOIOPower, it was impossible for an app extending AbstractIOIOActivity to respond to a disconnect. This has now changed, so HelloIOIOPower doesn't do anything that cannot be done with AbstractIOIOActivity.

However, the point being made remains valid:

You don't have to use AbstractIOIOActivity (and stick to the setup-loop-loop-loop-disconnect paradigm, to starting and stopping the connection in response to activity pause / resume, or to a single IOIO thread) for writing IOIO applications. You can explicitly create the IOIO object, and call waitForConnect() / disconnect() whenever you want, and do whatever you want with the IOIO instance, even from multiple threads at the same time (the API is completely thread-safe).

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/jC6GKPJs3HQJ.
To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ioio-users?hl=en.

Jeffrey Zhang

unread,
Sep 13, 2018, 5:27:14 PM9/13/18
to ioio-users
Hi, Ytai. For some reason, I couldn't use the IOIOService and IOIOActivity. So I explicitly create the IOIO object with the code "ioio = IOIOFactory.create()", but I got this error:

微信截图_20180913103313.png

I'm sure I got all the permissions the app needs. It is very likely I use it in a wrong way. Please help me and Thank you.
Warm regards,
Jeffrey. 

在 2012年1月5日星期四 UTC+8上午1:43:58,Ytai写道:

Ytai Ben-Tsvi

unread,
Sep 14, 2018, 8:03:28 PM9/14/18
to ioio-...@googlegroups.com
You'd need to do something like this:

But be warned, that you're choosing a very dis-recommended approach.

To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.

To post to this group, send email to ioio-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages