|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--superwaba.ext.ce.io.gprs.GPRS
This class is used to open GPRS connections on Pocket PC 2002 (and up) smartphones. Here is a sample code:
if (GPRS.getConnectionState() != GPRS.PPC_CONNMGR_STATUS_CONNECTED)
{
showMessage("gprs not connected " + GPRS.getConnectionState());
boolean ready = GPRS.openConnection();
showMessage("gprs attempt " + GPRS.getConnectionState() + " " + ready);
if (!ready)
{
boolean status = GPRS.openConnection(20000);
showMessage("gprs sp connection attempt2 " + GPRS.getConnectionState() + " " + status);
}
}
else
{
showMessage("gprs connected " + GPRS.getConnectionState());
}
If you don't call closeConnection at application's exit, the library will automatically call it.
You have to manually install the files lib/ce/CeIoGPRS.pdb and lib/ce/platform/processor/CeIoGPRS.dll
| Field Summary | |
static int |
PPC_CONNMGR_STATUS_CONNECTED
Returned in getConnectionState: The connection is established. |
static int |
PPC_CONNMGR_STATUS_CONNECTIONCANCELED
Returned in getConnectionState: The user aborted the connection, or the connection request was terminated because a more secure connection was established. |
static int |
PPC_CONNMGR_STATUS_CONNECTIONDISABLED
Returned in getConnectionState: The connection can be made, but the connection itself is disabled. |
static int |
PPC_CONNMGR_STATUS_CONNECTIONFAILED
Returned in getConnectionState: The connection has failed and cannot be re-established. |
static int |
PPC_CONNMGR_STATUS_DISCONNECTED
Returned in getConnectionState: The connection is disconnected. |
static int |
PPC_CONNMGR_STATUS_NOPATHTODESTINATION
Returned in getConnectionState: No path to the destination is available. |
static int |
PPC_CONNMGR_STATUS_UNKNOWN
Returned in getConnectionState: The status is unknown. |
static int |
PPC_CONNMGR_STATUS_WAITINGCONNECTION
Returned in getConnectionState: The device is attempting to connect. |
static int |
PPC_CONNMGR_STATUS_WAITINGCONNECTIONABORT
Returned in getConnectionState: The device is aborting connection attempt. |
static int |
PPC_CONNMGR_STATUS_WAITINGDISCONNECTION
Returned in getConnectionState: The connection is being disconnected. |
static int |
PPC_CONNMGR_STATUS_WAITINGFORNETWORK
Returned in getConnectionState: The device is waiting for a task with a higher priority to connect to the network before connecting to the same network. |
static int |
PPC_CONNMGR_STATUS_WAITINGFORPATH
Returned in getConnectionState: A path to the destination exists but is not presently available (for example, the device is out of radio range or is not plugged into its cradle). |
static int |
PPC_CONNMGR_STATUS_WAITINGFORPHONE
Returned in getConnectionState: A voice call is in progress and is using resources that this connection requires. |
static int |
PPC_CONNMGR_STATUS_WAITINGFORRESOURCE
Returned in getConnectionState: Another client is using resources that this connection requires. |
static int |
PPC_UTLLIB_CONMGRSTATUSERROR
Returned in getConnectionState: it was impossible to get the connection status from the device |
static int |
PPC_UTLLIB_NOCONNECTION
Returned in getConnectionState: there are no active GPRS connections. |
| Constructor Summary | |
GPRS()
|
|
| Method Summary | |
static boolean |
closeConnection()
closes a GPRS connection. |
static int |
getConnectionState()
Get the state of the GPRS connection |
static boolean |
openConnection()
Open a GPRS connection |
static int |
openConnection(int timeout)
Open a connection specifying a timeout interval. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int PPC_UTLLIB_NOCONNECTION
connect or that you had already called disconnect.public static final int PPC_UTLLIB_CONMGRSTATUSERROR
public static final int PPC_CONNMGR_STATUS_UNKNOWN
public static final int PPC_CONNMGR_STATUS_CONNECTED
public static final int PPC_CONNMGR_STATUS_DISCONNECTED
public static final int PPC_CONNMGR_STATUS_WAITINGFORPATH
public static final int PPC_CONNMGR_STATUS_WAITINGFORRESOURCE
public static final int PPC_CONNMGR_STATUS_WAITINGFORPHONE
public static final int PPC_CONNMGR_STATUS_WAITINGFORNETWORK
public static final int PPC_CONNMGR_STATUS_NOPATHTODESTINATION
public static final int PPC_CONNMGR_STATUS_CONNECTIONFAILED
public static final int PPC_CONNMGR_STATUS_CONNECTIONCANCELED
public static final int PPC_CONNMGR_STATUS_CONNECTIONDISABLED
public static final int PPC_CONNMGR_STATUS_WAITINGCONNECTION
public static final int PPC_CONNMGR_STATUS_WAITINGCONNECTIONABORT
public static final int PPC_CONNMGR_STATUS_WAITINGDISCONNECTION
| Constructor Detail |
public GPRS()
| Method Detail |
public static boolean openConnection()
public static boolean closeConnection()
public static int getConnectionState()
public static int openConnection(int timeout)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||