Hi Simon,
I've been experimenting with using android-btxfr to simplify transferring data and commands between a Glass and another Android device. I've set up client and server apps respectively and have added functionality to pair devices. Using your file transfer app as an example, I'm loading the bluetooth config in my main application and am also using a service to handle commands and data. I'm able to send data from the client to the server and see activity in the console, but only the first time I try to send — subsequent sends fail with a "socket closed" IOException being thrown by the incomingHandler of ClientThread.java. When I try to create new ClientThreads for subsequent messages, I end up getting null pointer exceptions (I've tried to tear down the thread first but it doesn't seem to make a difference). Is there a way to keep those sockets open, or a correct way to reopen them for new data?
Thanks!
Jeremy
Hi Simon,
I've been experimenting with using android-btxfr to simplify transferring data and commands between a Glass and another Android device. I've set up client and server apps respectively and have added functionality to pair devices. Using your file transfer app as an example, I'm loading the bluetooth config in my main application and am also using a service to handle commands and data. I'm able to send data from the client to the server and see activity in the console, but only the first time I try to send — subsequent sends fail with a "socket closed" IOException being thrown by the incomingHandler of ClientThread.java. When I try to create new ClientThreads for subsequent messages, I end up getting null pointer exceptions (I've tried to tear down the thread first but it doesn't seem to make a difference). Is there a way to keep those sockets open, or a correct way to reopen them for new data?
Thanks!
Jeremy