×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    124

    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.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    194

    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:

    ---CLIP---

    #include <nifman.h> // for RNif (nifman.lib)

    RNif nif;
    if (nif.Open() == KErrNone)
    {
    nif.Stop();
    nif.Close();
    }

    ---CLIP---

    Please see the documentation and examples from Nokia 9200-series SDK for Java on how to use JNI.

    10765

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×