Hi Ytai, I almost gave up on getting a reply from you, since my problem isn't connected to the IOIO board as such but is an android problem.
I have written tons of code in regular Java but android is a different mind set. In regular Java I make a constructor to a dialog or whatever else I want to use and then I call functions in the instantiated class. Here things just come alive by themselves. The problem with everything in a single file was that when the android screen turned off, it would disconnect the IOIO board, but my timer would keep counting. You can see my initial bias was to use a constructor and then somehow start the IOIO - and stop the IOIO when I am finished. I had no idea what exactly to call in "my1", assuming there is something in the IOIOActivity which will start the board. The only thing I could find was startActivity but that used new intent. It is totally unclear to me why having the code in a separate file would make any real difference. If I understand you correctly you are saying have the loop going always, but perhaps have the code which it operates in a separate object. Then I would never "start" or "stop" the IOIO itself but only control what it is doing in a separate object. I can't see how that would make any difference, since it is the card itself which is losing connection. I thought that if I could somehow start and stop the card itself, then it would no longer loose connection when the android screen goes off. It isn't clear to me who is telling the IOIO to drop the connection, and why. Once I see what the answer is, it will probably look very simple but at the moment it is all black magic. Somehow I need to get control and not have the card drop the connection whenever the screen goes blank or some other event. I looked at the source code for IOIOActivity and it didn't give me much. That code is the interface and I need something which calls it - something that does start and stop on the board itself. At least this is what I think I need. Thanks, Ilan -- 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 https://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/d/optout.
