TrafficDescriptor.Builder
  public
  static
  final
  
  class
  TrafficDescriptor.Builder
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.telephony.data.TrafficDescriptor.Builder | 
Provides a convenient way to set the fields of a TrafficDescriptor when creating a
 new instance.
 
The example below shows how you might create a new TrafficDescriptor:
 
 TrafficDescriptor response = new TrafficDescriptor.Builder()
     .setDnn("")
     .build();
 Summary
Public constructors | |
|---|---|
      
      Builder()
      
      
        Default constructor for Builder.  | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        TrafficDescriptor
     | 
  
    
      
      build()
      
      
        Build the   | 
  
        
        
        
        
        
        TrafficDescriptor.Builder
     | 
  
    
      
      setDataNetworkName(String dnn)
      
      
        Set the Data Network Name(DNN).  | 
  
        
        
        
        
        
        TrafficDescriptor.Builder
     | 
  
    
      
      setOsAppId(byte[] osAppId)
      
      
        Set the OS App ID (including OS Id as defined in the specs).  | 
  
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public TrafficDescriptor build ()
Build the TrafficDescriptor.
| Returns | |
|---|---|
TrafficDescriptor | 
        the TrafficDescriptor object.
 This value cannot be null. | 
      
| Throws | |
|---|---|
IllegalArgumentException | 
          if DNN and OS App ID are null. | 
setDataNetworkName
public TrafficDescriptor.Builder setDataNetworkName (String dnn)
Set the Data Network Name(DNN).
| Parameters | |
|---|---|
dnn | 
        
          String: This value cannot be null. | 
      
| Returns | |
|---|---|
TrafficDescriptor.Builder | 
        The same instance of the builder.
 This value cannot be null. | 
      
setOsAppId
public TrafficDescriptor.Builder setOsAppId (byte[] osAppId)
Set the OS App ID (including OS Id as defined in the specs).
| Parameters | |
|---|---|
osAppId | 
        
          byte: This value cannot be null. | 
      
| Returns | |
|---|---|
TrafficDescriptor.Builder | 
        The same instance of the builder.
 This value cannot be null. |