Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
  
  
TelephonyCallback.DataConnectionStateListener
  public
  static
  
  
  interface
  TelephonyCallback.DataConnectionStateListener
  
  
  
  
    
    | android.telephony.TelephonyCallback.DataConnectionStateListener | 
  
  
    
  Interface for data connection state listener.
Summary
| Public methods | 
|---|
  
  
  
    | 
        abstract
        
        
        
        
        void | 
      onDataConnectionStateChanged(int state, int networkType)
      Callback invoked when connection state changes on the registered subscription.
        
    
 | 
  
Public methods
    onDataConnectionStateChanged
    
public abstract void onDataConnectionStateChanged (int state, 
                int networkType)
    
    
    
  Callback invoked when connection state changes on the registered subscription.
 Note, the registration subscription ID comes from TelephonyManager object
 which registers TelephonyCallback by
 TelephonyManager.registerTelephonyCallback(Executor, TelephonyCallback).
 If this TelephonyManager object was created with
 TelephonyManager.createForSubscriptionId(int), then the callback applies to the
 subscription ID. Otherwise, this callback applies to
 SubscriptionManager.getDefaultSubscriptionId().
    
    | Parameters | 
|---|
      
        | state | int: is the current state of data connection.
 Value isTelephonyManager.DATA_UNKNOWN,TelephonyManager.DATA_DISCONNECTED,TelephonyManager.DATA_CONNECTING,TelephonyManager.DATA_CONNECTED,TelephonyManager.DATA_SUSPENDED,TelephonyManager.DATA_DISCONNECTING, orTelephonyManager.DATA_HANDOVER_IN_PROGRESS | 
      
        | networkType | int: is the current network type of data connection.
 Value isTelephonyManager.NETWORK_TYPE_UNKNOWN,TelephonyManager.NETWORK_TYPE_GPRS,TelephonyManager.NETWORK_TYPE_EDGE,TelephonyManager.NETWORK_TYPE_UMTS,TelephonyManager.NETWORK_TYPE_CDMA,TelephonyManager.NETWORK_TYPE_EVDO_0,TelephonyManager.NETWORK_TYPE_EVDO_A,TelephonyManager.NETWORK_TYPE_1xRTT,TelephonyManager.NETWORK_TYPE_HSDPA,TelephonyManager.NETWORK_TYPE_HSUPA,TelephonyManager.NETWORK_TYPE_HSPA,TelephonyManager.NETWORK_TYPE_IDEN,TelephonyManager.NETWORK_TYPE_EVDO_B,TelephonyManager.NETWORK_TYPE_LTE,TelephonyManager.NETWORK_TYPE_EHRPD,TelephonyManager.NETWORK_TYPE_HSPAP,TelephonyManager.NETWORK_TYPE_GSM,TelephonyManager.NETWORK_TYPE_TD_SCDMA,TelephonyManager.NETWORK_TYPE_IWLAN, orTelephonyManager.NETWORK_TYPE_NR | 
    
  
 
 
 
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]