MozMobileConnectionInfo

  • Revision slug: DOM/MozMobileConnectionInfo
  • Revision title: MozMobileConnectionInfo
  • Revision id: 357775
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment

Revision Content

{{ domref() }}

{{ non-standard_header() }}

The MozMobileConnectionInfo interface allow to access connection information for voice or data. The {{domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection")}} uses it through its voice and data properties.

Interface

interface MozMobileConnectionInfo
{
  readonly attribute DOMString? state;
  readonly attribute boolean connected;
  readonly attribute boolean emergencyCallsOnly;
  readonly attribute boolean roaming;
  readonly attribute {{domxref("MozMobileNetworkInfo")}} network;
  readonly attribute unsigned short lastKnownMcc;
  readonly attribute DOMString type;
  readonly attribute object? signalStrength;
  readonly attribute object relSignalStrength;
  readonly attribute {{domxref("MozMobileCellInfo")}} cell;
};

Properties

Name Type Description
cell {{domxref("MozMobileCellInfo")}} Gives access to cell location information
connected boolean Indicates whether the connection is ready.
emergencyCallsOnly boolean

Indicates whether only emergency calls are possible.

This flag is only relevant to voice connections and when connected is false.

lastKnownMcc unsigned short Mobile Country Code (MCC) of last known network operator
network {{domxref("MozMobileNetworkInfo")}} Gives access to the network operator information
relSignalStrength object Gives the signal strength, represented linearly as a number between 0 (weakest signal) and 100 (full signal)
roaming boolean Indicates whether the connection is going through a foreign operator (roaming) or not.
signalStrength object Gives the signal strength in dBm, or null if no service is available
state string

Gives the state of the connection.

Possible values are: notSearching, searching, denied, registered.

This property can also be null if the state is unknown.

type string

Gives the type of connection.

Possible values are: gsm, cdma, gprs, edge, umts, hsdpa, evdo0, evdoa, evdob, etc.

Methods

None.

Specification

Not part of any specification

See also

  • {{ domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection") }}
  • {{ domxref("MozMobileNetworkInfo") }}
  • {{ domxref("MozMobileCellInfo") }}

Revision Source

<p>{{ domref() }}</p>
<p>{{ non-standard_header() }}</p>
<p>The <code>MozMobileConnectionInfo</code> interface allow to access connection information for voice or data. The {{domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection")}} uses it through its <code>voice</code> and <code>data</code> properties.</p>
<h2 id="Interface">Interface</h2>
<pre>
interface MozMobileConnectionInfo
{
&nbsp; readonly attribute DOMString? state;
&nbsp; readonly attribute boolean connected;
&nbsp; readonly attribute boolean emergencyCallsOnly;
&nbsp; readonly attribute boolean roaming;
&nbsp; readonly attribute {{domxref("MozMobileNetworkInfo")}} network;
&nbsp; readonly attribute unsigned short lastKnownMcc;
&nbsp; readonly attribute DOMString type;
&nbsp; readonly attribute object? signalStrength;
&nbsp; readonly attribute object relSignalStrength;
&nbsp; readonly attribute {{domxref("MozMobileCellInfo")}} cell;
};</pre>
<h2 id="Properties">Properties</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Type</th>
      <th scope="col">Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>cell</code></td>
      <td>{{domxref("MozMobileCellInfo")}}</td>
      <td>Gives access to cell location information</td>
    </tr>
    <tr>
      <td><code>connected</code></td>
      <td><code>boolean</code></td>
      <td>Indicates whether the connection is ready.</td>
    </tr>
    <tr>
      <td><code>emergencyCallsOnly</code></td>
      <td><code>boolean</code></td>
      <td>
        <p>Indicates whether only emergency calls are possible.</p>
        <p>This flag is only relevant to voice connections and when <code>connected</code> is <code>false</code>.</p>
      </td>
    </tr>
    <tr>
      <td><code>lastKnownMcc</code></td>
      <td><code>unsigned short</code></td>
      <td><a href="http://en.wikipedia.org/wiki/Mobile_country_code" rel="external" title="http://en.wikipedia.org/wiki/Mobile_country_code">Mobile Country Code (MCC)</a> of last known network operator</td>
    </tr>
    <tr>
      <td><code>network</code></td>
      <td>{{domxref("MozMobileNetworkInfo")}}</td>
      <td>Gives access to the network operator information</td>
    </tr>
    <tr>
      <td><code>relSignalStrength</code></td>
      <td><code>object</code></td>
      <td>Gives the signal strength, represented linearly as a number between 0 (weakest signal) and 100 (full signal)</td>
    </tr>
    <tr>
      <td><code>roaming</code></td>
      <td><code>boolean</code></td>
      <td>Indicates whether the connection is going through a foreign operator (roaming) or not.</td>
    </tr>
    <tr>
      <td><code>signalStrength</code></td>
      <td><code>object</code></td>
      <td>Gives the signal strength in dBm, or <code>null</code> if no service is available</td>
    </tr>
    <tr>
      <td><code>state</code></td>
      <td><code>string</code></td>
      <td>
        <p>Gives the state of the connection.</p>
        <p>Possible values are: <code>notSearching</code>, <code>searching</code>, <code>denied</code>, <code>registered</code>.</p>
        <p>This property can also be <code>null</code> if the state is unknown.</p>
      </td>
    </tr>
    <tr>
      <td><code>type</code></td>
      <td><code>string</code></td>
      <td>
        <p>Gives the type of connection.</p>
        <p>Possible values are: <code>gsm</code>, <code>cdma</code>, <code>gprs</code>, <code>edge</code>, <code>umts</code>, <code>hsdpa</code>, <code>evdo0</code>, <code>evdoa</code>, <code>evdob</code>, etc.</p>
      </td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<p>None.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<p>Not part of any specification</p>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection") }}</li>
  <li>{{ domxref("MozMobileNetworkInfo") }}</li>
  <li>{{ domxref("MozMobileCellInfo") }}</li>
</ul>
Revert to this revision