ONE OR TWO SECONDS???
Something is wrong here, which is likely NOT Android. I would advise you to
try to write a simple-as-possible app that interacts with the IOIO over a
service and measure the latency. It is possible that you're somehow either
maxing out the CPU or the IPC bandwidth by having some problem in your
code, for example running a tight loop without delays (maybe your loop()
method?)

On Wed, Sep 3, 2014 at 7:22 AM, JT <[email protected]>
wrote:

> Those are some good suggestions, but unfortunately the service does run in
> a different application, in order to allow another group to hook into the
> service.
>
> I do have the TCP/IP implementation up and running, and it seems to reduce
> the peak delay from one or two seconds down to 10s and 100s of
> milliseconds, but I am continuing to improve this.
>
>
> On Friday, August 29, 2014 4:03:32 AM UTC-5, davidmc wrote:
>>
>> Is your service in the same application as your activities? If so, you
>> can simply bind to the service and call its methods directly (although I
>> think you're suggesting you've done that already?). I'd be surprised if
>> that had significant latency. Other alternatives are:
>>
>> 1) When I had to pass data from the IOIO around various activities I used
>> a singleton which my IOIOLooper wrote to and the rest of my activities read
>> from. This was exposed to my activities via an interface. You could do
>> similar, but have your service register as a listener on the singleton and
>> your activities calling the methods.
>>
>> 2) You could manage the connection to the IOIO in your application class,
>> provide a getLooper method to return an instance of your looper class and
>> call methods on that directly.
>>
>> If your service is not in the same application as your activities, you'll
>> need to take a different approach. Do you have the TCP/IP implementation up
>> and running? I'd be surprised if this is faster than using Binders.
>>
>> On Thursday, 28 August 2014 15:12:21 UTC+1, JT wrote:
>>>
>>> Yes, we did work with that pattern first, but the delay was too much. If
>>> anyone else has to do something similar, we are now trying out a TCP/IP
>>> socket approach to speed up data transfer.
>>>
>>> On Monday, August 25, 2014 11:10:12 AM UTC-5, Ytai wrote:
>>>>
>>>> There are several different ways to communicate between an app and a
>>>> service. Not sure what's the latency like on each but I would expect that
>>>> using the Binder pattern should be fairly lightweight.
>>>> On Aug 21, 2014 9:36 PM, "JT" <[email protected]> wrote:
>>>>
>>>>>  Hello all –
>>>>>
>>>>> I have several apps that use IOIO on an android phone. In order to
>>>>> suppress constant permission requests and repeated unplug/plugs, I have
>>>>> built a background service to handle the IOIO connection (Looper, etc.) 
>>>>> and
>>>>> receive the incoming data from apps.
>>>>>
>>>>> The problem is that I need to pass information on every touch
>>>>> interaction to the IOIO. Using a Messenger/Handler service seems to create
>>>>> a significant amount of delay between the touch interaction and the IOIO
>>>>> response.
>>>>>
>>>>> Is there a better way to pass this data to the IOIO while still
>>>>> suppressing the permission requests between apps?
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> 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.
>

-- 
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.

Reply via email to