See: Description
Interface | Description |
---|---|
CellularNetworkListener |
Interface to receive cellular network related events,
like network connection/disconnection, current cell change, etc.
|
SubscriberListener |
Interface to receive subscribers related events,
like subscriber hot swap.
|
Class | Description |
---|---|
CellularNetwork |
CellularNetwork class represents a cellular network such as a 3GPP or CDMA network.
|
CellularPermission |
CellularPermission is a BasicPermission for access to cellular information.
|
Subscriber |
Subscriber class represents cellular network's subscriber identity, like SIM,
R-UIM, CSIM.
|
Exception | Description |
---|---|
NetworkDisconnectedException |
Indicates that cellular network was disconnected.
|
The Subscriber
class represents cellular
network's subscriber identity, like SIM, R-UIM, CSIM. This class provides
methods to obtain subscriber identifiers (e.g. phone number, IMSI, etc.)
and subscriber's operator identifiers (e.g. operator name, MCC, MNC codes).
The CellularNetwork
class represents
3GPP or CDMA network the device is registered on. It provides information
about network type, state, subscriber and identifiers which depends on the
network type.
User sensitive information in this package is protected by the
CellularPermission
class.
Some code examples are given below.
Subscriber subscriber = Subscriber.getBySlotNumber(1); |
Map<String, String> properties = subscriber.getProperties(); int mcc = Integer.parseInt(properties.get("mcc")); int mnc = Integer.parseInt(properties.get("mnc")); |
Subscriber subscriber = Subscriber.getBySlotNumber(1); // get primary subscriber CellularNetwork network = subscriber.getNetwork(); boolean roaming = network.isRoaming(); |
Map<String, String> cellProperties = network.getCellProperties(); int bid = Integer.parseInt(properties.get("bid")); |
Unless otherwise noted, passing a null
argument to a constructor
or method in any class or interface in this package MUST cause a
java.lang.NullPointerException
to be thrown.
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.