Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
    AuthenticationRequiredException
    class AuthenticationRequiredException : SecurityException, Parcelable
    
    Specialization of SecurityException that is thrown when authentication is needed from the end user before viewing the content. 
     This exception is only appropriate where there is a concrete action the user can take to authorize and make forward progress, such as confirming or entering authentication credentials, or granting access via other means. 
     Note: legacy code that receives this exception may treat it as a general SecurityException, and thus there is no guarantee that the action contained will be invoked by the user. 
    Summary
    
      
        
          | Inherited constants | 
        
          | From class Parcelable
                
                  
                    | Int | CONTENTS_FILE_DESCRIPTOR
                         Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor. |  
                    | Int | PARCELABLE_WRITE_RETURN_VALUE
                         Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point. |  | 
      
    
    
      
        
          | Public constructors | 
        
          | Create an instance ready to be thrown. | 
      
    
    
    
    Public constructors
    
      AuthenticationRequiredException
      
      AuthenticationRequiredException(
    cause: Throwable!, 
    userAction: PendingIntent!)
      Create an instance ready to be thrown.
      
        
          
            | Parameters | 
          
            | cause | Throwable!: original cause with details designed for engineering audiences. | 
          
            | userAction | PendingIntent!: primary action that will initiate the recovery. This must launch an activity that is expected to set Activity.setResult(int)before finishing to communicate the final status of the recovery. For example, apps that observeActivity.RESULT_OKmay choose to immediately retry their operation. | 
        
      
     
    Public methods
    
      describeContents
      
      fun describeContents(): Int
      
     
    
      getUserAction
      
      fun getUserAction(): PendingIntent!
      Return primary action that will initiate the authorization.
     
    
    Properties
    
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  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.
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]