Reputation: 1962
Just as the title says. I'm getting this error when starting a Service that uses sockets. How come?
Upvotes: 0
Views: 232
Reputation: 1007349
Because you are attempting to use sockets on the main application thread, perhaps from onStartCommand()
. Please do network I/O on a background thread.
Upvotes: 2