Android Open Source - MobileConnectTestApp Phone State






From Project

Back to project page MobileConnectTestApp.

License

The source code is released under:

MIT License

If you think the Android project MobileConnectTestApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.gsma.android.xoperatorapidemo.utils;
//from  ww  w .jav a  2s . c o m
/**
 * object holding the phone state that is useful to discovery
 */
public class PhoneState {
  String msisdn = null; // mobile telephone number of the user
  String simOperator = null; // field comprising Mobile Country Code and
                // Mobile Network Code
  String mcc = null; // Mobile Country Code
  String mnc = null; // Mobile Network Code
  boolean connected = false; // is the device connected to the Internet
  boolean usingMobileData = false; // is the device connecting using
                    // mobile/cellular data
  boolean roaming = false; // is the device roaming (international)
  String simSerialNumber = null; // the SIM serial number 

  public PhoneState(String msisdn, String simOperator, String mcc,
      String mnc, boolean connected, boolean usingMobileData,
      boolean roaming, String simSerialNumber) {
    this.msisdn = msisdn;
    this.simOperator = simOperator;
    this.mcc = mcc;
    this.mnc = mnc;
    this.connected = connected;
    this.usingMobileData = usingMobileData;
    this.roaming = roaming;
    this.simSerialNumber = simSerialNumber;
  }

  /**
   * @return the msisdn
   */
  public String getMsisdn() {
    return msisdn;
  }
  /**
   * @param msisdn
   *            the msisdn to set
   */
  public void setMsisdn(String msisdn) {
    this.msisdn = msisdn;
  }
  /**
   * @return the simOperator
   */
  public String getSimOperator() {
    return simOperator;
  }

  /**
   * @param simOperator
   *            the simOperator to set
   */
  public void setSimOperator(String simOperator) {
    this.simOperator = simOperator;
  }

  /**
   * @return the mcc
   */
  public String getMcc() {
    return mcc;
  }
  /**
   * @param mcc
   *            the mcc to set
   */
  public void setMcc(String mcc) {
    this.mcc = mcc;
  }
  /**
   * @return the mnc
   */
  public String getMnc() {
    return mnc;
  }
  /**
   * @param mnc
   *            the mnc to set
   */
  public void setMnc(String mnc) {
    this.mnc = mnc;
  }
  /**
   * @return the connected
   */
  public boolean isConnected() {
    return connected;
  }
  /**
   * @param connected
   *            the connected to set
   */
  public void setConnected(boolean connected) {
    this.connected = connected;
  }
  /**
   * @return the usingMobileData
   */
  public boolean isUsingMobileData() {
    return usingMobileData;
  }
  /**
   * @param usingMobileData
   *            the usingMobileData to set
   */
  public void setUsingMobileData(boolean usingMobileData) {
    this.usingMobileData = usingMobileData;
  }

  /**
   * @return the roaming
   */
  public boolean isRoaming() {
    return roaming;
  }

  /**
   * @param roaming
   *            the roaming to set
   */
  public void setRoaming(boolean roaming) {
    this.roaming = roaming;
  }

  /**
   * @return the simSerialNumber
   */
  public String getSimSerialNumber() {
    return simSerialNumber;
  }

  /**
   * @param simSerialNumber the simSerialNumber to set
   */
  public void setSimSerialNumber(String simSerialNumber) {
    this.simSerialNumber = simSerialNumber;
  }

}




Java Source Code List

com.gsma.android.xoperatorapidemo.activity.MainActivity.java
com.gsma.android.xoperatorapidemo.activity.SettingsActivity.java
com.gsma.android.xoperatorapidemo.activity.discovery.ActiveDiscoveryTask.java
com.gsma.android.xoperatorapidemo.activity.discovery.DiscoveryProcessEndpoints.java
com.gsma.android.xoperatorapidemo.activity.discovery.DisplayDiscoveryWebsiteActivity.java
com.gsma.android.xoperatorapidemo.activity.discovery.PassiveDiscoveryTask.java
com.gsma.android.xoperatorapidemo.activity.discovery.ProcessDiscoveryToken.java
com.gsma.android.xoperatorapidemo.activity.identity.AuthorizationCompleteActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.DisplayIdentityWebsiteActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.OpenIDConnectAbstractActivity.java
com.gsma.android.xoperatorapidemo.activity.identity.RetrieveTokenTask.java
com.gsma.android.xoperatorapidemo.activity.identity.RetrieveUserinfoTask.java
com.gsma.android.xoperatorapidemo.discovery.Api.java
com.gsma.android.xoperatorapidemo.discovery.DeveloperOperatorSetting.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryData.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryDeveloperOperatorSettings.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryServingOperatorSettings.java
com.gsma.android.xoperatorapidemo.discovery.DiscoveryStartupSettings.java
com.gsma.android.xoperatorapidemo.discovery.LinkConstants.java
com.gsma.android.xoperatorapidemo.discovery.Link.java
com.gsma.android.xoperatorapidemo.discovery.Response.java
com.gsma.android.xoperatorapidemo.discovery.ServingOperatorSetting.java
com.gsma.android.xoperatorapidemo.identity.UserinfoAddress.java
com.gsma.android.xoperatorapidemo.identity.Userinfo.java
com.gsma.android.xoperatorapidemo.logo.LogoCacheItem.java
com.gsma.android.xoperatorapidemo.logo.LogoCache.java
com.gsma.android.xoperatorapidemo.logo.LogoLoaderTask.java
com.gsma.android.xoperatorapidemo.logo.LogoResponseArray.java
com.gsma.android.xoperatorapidemo.logo.LogoResponse.java
com.gsma.android.xoperatorapidemo.utils.HttpUtils.java
com.gsma.android.xoperatorapidemo.utils.JsonUtils.java
com.gsma.android.xoperatorapidemo.utils.KeyValuePair.java
com.gsma.android.xoperatorapidemo.utils.ParameterList.java
com.gsma.android.xoperatorapidemo.utils.PhoneState.java
com.gsma.android.xoperatorapidemo.utils.PhoneUtils.java
com.gsma.android.xoperatorapidemo.utils.PreferencesUtils.java