Disconnecting a data call from a Personal Java application
How to close (hang up) a data call that has opened from a Personal Java application? Closing a socket is not sufficient: It does not disconnect the data call, or it is closed only after a connection timeout.
RE: Disconnecting a data call from a Personal Java application
It is not possible to disconnect a data call connection directly from a Java application. However, the workaround is to use a JNI wrapper for a NIFMAN (network interface manager) C++ API.
NIFMAN provides a monitoring API which allows applications to monitor the status of the network connection, and display it to their users.
First close the socket normally. If there are no other application sockets currently connected, the following simple C++ code will cause the connection to be immediately closed:
#include <nifman.h> // for RNif (nifman.lib)
if (nif.Open() == KErrNone)
Please see the documentation and examples from Nokia 9200-series SDK for Java on how to use JNI.