You need a block such as:
static {
IOIOConnectionRegistry
.addBootstraps(new String[] {
"ioio.lib.impl.SocketIOIOConnectionBootstrap",
"ioio.lib.android.accessory.AccessoryConnectionBootstrap",
"ioio.lib.android.bluetooth.BluetoothIOIOConnectionBootstrap",
"ioio.lib.android.device.DeviceConnectionBootstrap"});
}
In one of you application classes. Having said that, I strongly
disrecommend you to use IOIOFactory.create() directly. Chances are that if
you are not very careful about dealing with all the possible paths that may
lead to connection/disconnection you may find your app unable to reliably
establish a connection to the IOIO.
Do you really have a good reason to not use IOIOActivity? Not sure what
timing concerns you have that would be mitigated by avoiding the
application framework.
On Thu, Oct 16, 2014 at 10:37 AM, YT <[email protected]> wrote:
> Update,
>
> Android OS: 4.4.2
> IOIO hardware: spark0020
> Firmware: App-IOIO0500
> Bootloader: IOIO0400
>
>
> On Tuesday, October 14, 2014 10:33:05 PM UTC-7, YT wrote:
>>
>> Hi, first of all, I have no problems running all the examples in
>> APP-IOIO0504.zip (https://github.com/ytai/ioio/wiki/Downloads).
>> Because my App has timing concern (in terms of mini sec), I would like to
>> create an IOIO connection myself instead of using BaseIOIOLooper (i.e.
>> another thread) or IOIOActivity.
>>
>> When I run the code "IOIOFactory.create()", it shows up the following
>> error:
>> ---
>> 10-14 22:02:59.473: E/IOIOFactory(29160): No connection is available.
>> This shouldn't happen.
>> ---
>>
>> May I have your suggestions? Thank you.
>> -yt
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.