SocketException (The system call was cancelled)

I am working on a android project and I need to connect the gPhone with the PC using UDP socket. The same operation, sending a message to from gPhone to the PC, returns different results in different time: Sometimes succeeded and sometimes throws a SocketException(The system call was cancelled).

Can anyone tell me what possibly results in this SocketException?

Answers


Add this to your app's manifest:

<uses-permission android:name="android.permission.INTERNET" />

Need Your Help

Java Applet not killed when browsing away

java applet

How do I stop the process of a Java Applet when a user navigates away from the page the applet has been loaded from?