Class ApnCtrl


  • public class ApnCtrl
    extends java.lang.Object
    The type Apn ctrl.
    • Constructor Summary

      Constructors 
      Constructor Description
      ApnCtrl​(android.content.Context context)
      Instantiates a new Apn ctrl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.os.Bundle ApnAddProfile​(java.lang.String profileData)
      Add Apn data Apn profile contain {"_id","name","numeric","mcc","mnc","apn","user","server","password", "proxy","port","mmsproxy","mmsport","mmsc","authtype","type","current", "protocol","roaming_protocol","carrier_enabled","bearer","mvno_type","mvno_match_data"} profile param need 22 item data without _id.
      android.os.Bundle ApnDeleteAll()
      Apn delete all bundle.
      android.os.Bundle ApnDeleteProfile​(java.lang.String apnName)
      Apn delete profile.
      android.os.Bundle ApnGetActivieProfileApnName()
      Apn get activie profile apn name bundle.
      android.os.Bundle ApnGetNameList()
      Apn get name list bundle.
      android.os.Bundle ApnGetProfile​(java.lang.String apnName)
      Apn get profile bundle.
      android.os.Bundle ApnProfileIsExist​(java.lang.String apnName)
      Apn profile is exist.
      android.os.Bundle ApnSetActiveProfile​(java.lang.String apnName)
      Apn set active profile bundle.
      android.os.Bundle ApnUpdateProfile​(java.lang.String profileData)
      Apn update profile.
      android.os.Bundle setAirplaneMode​(boolean enabled)
      Set airplane mode.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ApnCtrl

        public ApnCtrl​(android.content.Context context)
        Instantiates a new Apn ctrl.
        Parameters:
        context - the context
    • Method Detail

      • ApnAddProfile

        public android.os.Bundle ApnAddProfile​(java.lang.String profileData)
        Add Apn data Apn profile contain {"_id","name","numeric","mcc","mnc","apn","user","server","password", "proxy","port","mmsproxy","mmsport","mmsc","authtype","type","current", "protocol","roaming_protocol","carrier_enabled","bearer","mvno_type","mvno_match_data"} profile param need 22 item data without _id.
        Parameters:
        profileData - example: kk;46692;466;92;internet;;;;;;;;;0;default,supl;1;IP;IP;1;0;; (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg = bundle.getString("errorMsg");
      • ApnDeleteProfile

        public android.os.Bundle ApnDeleteProfile​(java.lang.String apnName)
        Apn delete profile.
        Parameters:
        apnName - the apn name (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg = bundle.getString("errorMsg");
      • ApnProfileIsExist

        public android.os.Bundle ApnProfileIsExist​(java.lang.String apnName)
        Apn profile is exist.
        Parameters:
        apnName - the apn name (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg = bundle.getString("errorMsg");
      • ApnUpdateProfile

        public android.os.Bundle ApnUpdateProfile​(java.lang.String profileData)
        Apn update profile. Apn profile contain {"_id","name","numeric","mcc","mnc","apn","user","server","password", "proxy","port","mmsproxy","mmsport","mmsc","authtype","type","current", "protocol","roaming_protocol","carrier_enabled","bearer","mvno_type","mvno_match_data"} profile param need 22 item data without _id.
        Parameters:
        profileData - example: kk;46692;466;92;internet;;;;;;;;;0;default,supl;1;IP;IP;1;0;; (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg = bundle.getString("errorMsg");
      • ApnDeleteAll

        public android.os.Bundle ApnDeleteAll()
        Apn delete all bundle.
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
      • ApnSetActiveProfile

        public android.os.Bundle ApnSetActiveProfile​(java.lang.String apnName)
        Apn set active profile bundle.
        Parameters:
        apnName - the apn name (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
      • ApnGetActivieProfileApnName

        public android.os.Bundle ApnGetActivieProfileApnName()
        Apn get activie profile apn name bundle.
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        String appName = bundle.getString("AppName");
      • ApnGetNameList

        public android.os.Bundle ApnGetNameList()
        Apn get name list bundle.
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        ArrayList appNameList = bundle.getStringArrayList("ApnNameList");
      • ApnGetProfile

        public android.os.Bundle ApnGetProfile​(java.lang.String apnName)
        Apn get profile bundle.
        Parameters:
        apnName - the apn name (String)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        for loop, bundle.getString(COLUMNS_OF_APN[i])
        final String[] COLUMNS_OF_APN = {
        "_id", "name", "numeric", "mcc", "mnc",
        "apn", "user", "server", "password", "proxy",
        "port", "mmsproxy", "mmsport", "mmsc", "authtype",
        "type", "current", "protocol", "roaming_protocol",
        "carrier_enabled", "bearer", "mvno_type", "mvno_match_data"
        };
      • setAirplaneMode

        public android.os.Bundle setAirplaneMode​(boolean enabled)
        Set airplane mode.
        Parameters:
        enabled - true or false (boolean)
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");