com.pax.dal

Interface IPhoneManager

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  IPhoneManager.IVSimAndESimListener
      VSim和ESim服务监听器
      VSim and ESim service listener
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method and Description
      void enableAirplaneMode(boolean enable)
      设置是否开启飞行模式。
      Sets whether the airplane mode is enabled.
      void enableVoLteMode(boolean enable)
      打开或者关闭当前使用卡的VoLte模式。
      Enable or disable the VoLte mode of the currently used card.
      java.util.List<OperatorInfo> getCellNetworkScanResults(int subId)
      扫描当前网络并返回结果。该接口会阻塞线程,不能在主线程调用,会耗时几分钟。
      Scan the current network and return the results.This interface blocks the thread and cannot be called on the main thread, which can take several minutes.
      boolean getDataRoamingEnabled(int subId)
      获取数据漫游状态。
      Gets the data roaming state.
      int getDefaultDataSubscriptionId()
      获取默认数据流量卡的Subscription Id。
      Gets the Subscription Id for the default data traffic card.
      int getPreferredNetworkType()
      获取网络优先模式。
      Get network preferred mode.
      java.lang.String[] getSIMInfo()
      获取主SIM卡相关信息。
      Get primary SIM related information.
      java.lang.String[] getSIMInfoWithSlotId(int slotId)
      通过卡槽号获取SIM相关信息。
      Get SIM information from the card slot number.
      int[] getSubId(int slotId)
      通过卡槽获取SIM卡索引
      Obtaining SIM card index through a slot
      java.lang.String getSubscriberId(int subId)
      通过subId获取IMSI。
      Get IMSI by subId.
      java.lang.String getUiccMode()
      获取当前使用的模式。
      Get the mode currently in use.
      void getVSimAndESimServiceState(IPhoneManager.IVSimAndESimListener listener)
      获取卡服务状态。
      Get the card service state.
      boolean isAirplaneModeEnable()
      判断飞行模式是否开启。
      Check whether the airplane mode is enabled.
      boolean isDualSim()
      获取是否支持双SIM卡。
      Get whether dual SIM cards are supported.
      boolean isSimCardLock(int subId)
      获取SIM卡锁的状态。
      Get the status of SIM card lock.
      boolean isSimPresent(int slotId)
      获取对应卡槽是否插入SIM卡。
      Obtain whether a SIM card is inserted into the corresponding slot.
      boolean isVSimDataInUse()
      Deprecated. 
      获取VSIM状态。
      Get VSIM status.
      void listenPhoneState(android.telephony.PhoneStateListener stateListener, int events, int subId)
      通过PhoneStateListener获取SIM卡状态,必须在Activity的主线程调用
      Obtaining the status of SIM card through PhoneStateListener must be called by the main thread of Activity.
      void setDataRoamingEnabled(int subId, boolean enable)
      设置数据漫游。
      Set up the data roaming.
      void setDefaultDataSubId(int subId)
      设置哪张卡来使用数据流量
      set which card to use data traffic
      void setNetworkSelectionModeAutomatic(int subId)
      设置网络选择模式为自动。
      Set the network selection mode to automatic.
      boolean setNetworkSelectionModeManual(int subId, OperatorInfo operator)
      设置网络运营商。
      Set up a network operator.
      boolean setPreferredNetworkType(int networkType)
      设置网络优选模式。
      Set network preferred mode.
      void setUiccMode(java.lang.String mode)
      设置要使用的模式,重启后生效。
      Set the mode to use, restart to take effect.
      void turnOffVSimAndESimService(IPhoneManager.IVSimAndESimListener listener)
      关闭卡数据服务。
      Turn off the card data service.
      void turnOffVSimData()
      Deprecated. 
      关闭VSIM。
      Turn off VSIM.
      void turnOnVSimAndESimService(IPhoneManager.IVSimAndESimListener listener)
      打开卡数据服务。
      Turn on the card data service.
      void turnOnVSimData()
      Deprecated. 
      打开VSIM。
      Turn on VSIM.
      void updatePlmn(int phoneId, java.lang.String operation, java.lang.String plmn)
      对SIM卡进行操作:禁用plmn或者解除plmn禁用,重启生效。
      Perform operations on the SIM card: Disable PLMN or enable PLMN,Reboot has taken effect.
      void updateShareProfile(java.lang.String shareProfilePath)
      更新种子卡资源文件,设置后重启生效。
      Update share profile and restart to take effect.
    • Method Detail

      • getSubId

        int[] getSubId(int slotId)
                throws PhoneDevException
        通过卡槽获取SIM卡索引
        Obtaining SIM card index through a slot
        Parameters:
        slotId -
        0或1
        0 or 1
        Returns:
        SIM卡索引
        SIM card index
        Throws:
        PhoneDevException
      • listenPhoneState

        void listenPhoneState(android.telephony.PhoneStateListener stateListener,
                              int events,
                              int subId)
                       throws PhoneDevException
        通过PhoneStateListener获取SIM卡状态,必须在Activity的主线程调用
        Obtaining the status of SIM card through PhoneStateListener must be called by the main thread of Activity.
        Parameters:
        stateListener -
        PhoneStateListener
        PhoneStateListener
        events -
        参考PhoneStateListener
        refer to PhoneStateListener
        subId -
        SIM卡索引,通过getSubId获取
        SIM card index,through call getSubId
        Throws:
        PhoneDevException
      • setDefaultDataSubId

        void setDefaultDataSubId(int subId)
                          throws PhoneDevException
        设置哪张卡来使用数据流量
        set which card to use data traffic
        Parameters:
        subId -
        SIM卡索引,通过getSubId获取
        SIM card index,through call getSubId
        Throws:
        PhoneDevException
      • setPreferredNetworkType

        boolean setPreferredNetworkType(int networkType)
                                 throws PhoneDevException
        设置网络优选模式。
        Set network preferred mode.
        Parameters:
        networkType -
        模式。
        • 1:4G/3G/2G 自动选择
        • 2:3G/2G 自动选择
        • 3:2G
        • 4:2G(CDMA only)
        • 5:2G(GSM only)
        • 6:4G only
        Mode.
        • 1:4G/3G/2G automatic selection
        • 2:3G/2G automatic selection
        • 3:2G
        • 4:2G(CDMA only)
        • 5:2G(GSM only)
        • 6:4G only
        Returns:
        设置结果。true:成功;false:失败。
        Result. true:success; false:failure.
        Throws:
        PhoneDevException
        Since:
        V3.08.00
      • enableAirplaneMode

        void enableAirplaneMode(boolean enable)
                         throws PhoneDevException
        设置是否开启飞行模式。
        Sets whether the airplane mode is enabled.
        Parameters:
        enable -
        true:开启; false:关闭。
        True: open; False: closed.
        Throws:
        PhoneDevException
        Since:
        V3.17.00
      • getCellNetworkScanResults

        java.util.List<OperatorInfogetCellNetworkScanResults(int subId)
                                                        throws PhoneDevException
        扫描当前网络并返回结果。该接口会阻塞线程,不能在主线程调用,会耗时几分钟。
        Scan the current network and return the results.This interface blocks the thread and cannot be called on the main thread, which can take several minutes.
        Parameters:
        subId -
        SIM卡索引。通过getSubId(int)获取。
        SIM card indexes. Get it by getSubId(int).
        Returns:
        OperatorInfo
        Throws:
        PhoneDevException
        Since:
        V3.20.00
      • isSimCardLock

        boolean isSimCardLock(int subId)
                       throws PhoneDevException
        获取SIM卡锁的状态。
        Get the status of SIM card lock.
        Parameters:
        subId -
        SIM卡索引。通过{getSubId(int)}获取。
        SIM card index. It is obtained through {getSubId(int)}.
        Returns:
        True:已锁;False:没有锁。
        True: locked; False: no lock.
        Throws:
        PhoneDevException
        Since:
        V3.20.00
      • isDualSim

        boolean isDualSim()
                   throws PhoneDevException
        获取是否支持双SIM卡。
        Get whether dual SIM cards are supported.
        Returns:
        True:支持;False:不支持。
        True: supported; False: not supported.
        Throws:
        PhoneDevException
        Since:
        V3.22.00
      • getSIMInfo

        java.lang.String[] getSIMInfo()
                               throws PhoneDevException
        获取主SIM卡相关信息。
        Get primary SIM related information.
        Returns:
        simInfo[0]:DeviceId
        simInfo[1]:IMEI
        simInfo[2]:ICCID
        simInfo[3]:SIM operator name
        simInfo[4]:Network operator name
        simInfo[0]:DeviceId
        simInfo[1]:IMEI
        simInfo[2]:ICCID
        simInfo[3]:SIM operator name
        simInfo[4]:Network operator name
        Throws:
        PhoneDevException
        Since:
        V3.29.00
      • getSIMInfoWithSlotId

        java.lang.String[] getSIMInfoWithSlotId(int slotId)
                                         throws PhoneDevException
        通过卡槽号获取SIM相关信息。
        Get SIM information from the card slot number.
        Parameters:
        slotId -
        0或1
        0 or 1
        Returns:
        simInfo[0]:DeviceId
        simInfo[1]:IMEI
        simInfo[2]:ICCID
        simInfo[3]:SIM operator name
        simInfo[4]:Network operator name
        simInfo[0]:DeviceId
        simInfo[1]:IMEI
        simInfo[2]:ICCID
        simInfo[3]:SIM operator name
        simInfo[4]:Network operator name
        Throws:
        PhoneDevException
        Since:
        V3.32.00
      • updateShareProfile

        void updateShareProfile(java.lang.String shareProfilePath)
                         throws PhoneDevException
        更新种子卡资源文件,设置后重启生效。
        Update share profile and restart to take effect.
        Parameters:
        shareProfilePath -
        文件路径,不能为空,文件必须存在。
        The file path, cannot be empty. The file must exist.
        Throws:
        PhoneDevException
        Since:
        V3.33.00
      • setUiccMode

        void setUiccMode(java.lang.String mode)
                  throws PhoneDevException
        设置要使用的模式,重启后生效。
        Set the mode to use, restart to take effect.
        Parameters:
        mode -
        • "ESIM"
        • "GSMA_ESIM"
        • "ESIM"
        • "GSMA_ESIM"
        Throws:
        PhoneDevException
        Since:
        V3.33.00
      • enableVoLteMode

        void enableVoLteMode(boolean enable)
                      throws PhoneDevException
        打开或者关闭当前使用卡的VoLte模式。
        Enable or disable the VoLte mode of the currently used card.
        Parameters:
        enable -
        true:打开VoLte false:关闭VoLte
        true: enable, false: disable
        Throws:
        PhoneDevException
        Since:
        V3.34.00
      • getSubscriberId

        java.lang.String getSubscriberId(int subId)
                                  throws PhoneDevException
        通过subId获取IMSI。
        Get IMSI by subId.
        Parameters:
        subId -
        SIM卡索引。通过getSubId(int)获取。
        SIM card index. Get it by getSubId(int).
        Returns:
        IMSI(International Mobile Subscriber Identity)
        IMSI(International Mobile Subscriber Identity)
        Throws:
        PhoneDevException
        Since:
        V4.07.00
      • getDefaultDataSubscriptionId

        int getDefaultDataSubscriptionId()
                                  throws PhoneDevException
        获取默认数据流量卡的Subscription Id。
        Gets the Subscription Id for the default data traffic card.
        Returns:
        默认数据流量卡的Subscription Id
        Subscription Id of the default data traffic card
        Throws:
        PhoneDevException
        Since:
        V4.14.00
      • isSimPresent

        boolean isSimPresent(int slotId)
                      throws PhoneDevException
        获取对应卡槽是否插入SIM卡。
        Obtain whether a SIM card is inserted into the corresponding slot.
        Parameters:
        slotId -
        0或1。
        0 or 1.
        Returns:
        true-存在, false-未插入
        true- exists, false- not inserted
        Throws:
        PhoneDevException
        Since:
        V4.14.00
      • updatePlmn

        void updatePlmn(int phoneId,
                        java.lang.String operation,
                        java.lang.String plmn)
                 throws PhoneDevException
        对SIM卡进行操作:禁用plmn或者解除plmn禁用,重启生效。
        Perform operations on the SIM card: Disable PLMN or enable PLMN,Reboot has taken effect.
        Parameters:
        phoneId -
        卡槽号,一般是0或者1
        The slot number is usually 0 or 1.
        operation -
        只允许2个值:"1"表示禁用,"0"表示解除禁用
        Only two values are allowed: "1" indicates disable, and "0" indicates enable.
        plmn -
        想要禁用或者解除禁用的plmn,plmn长度为5位或者6位,每一位的取值范围:0~9
        To disable or re-enable a PLMN, the PLMN length should be 5 or 6 digits. Each digit's value range is from 0 to 9.
        Throws:
        PhoneDevException
        Since:
        V4.18.00