Skip to content

Keep client and server sockets open? #4

Description

@OverlappingElvis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions