# AppFunctionPermissionRequiredException

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/AppFunctionAppExceptions.kt+class:androidx.appfunctions.AppFunctionPermissionRequiredException) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
public final class AppFunctionPermissionRequiredException extends AppFunctionAppException
```

<br />

|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||||
|   |   | ↳ | [androidx.appfunctions.AppFunctionException](https://developer.android.com/reference/androidx/appfunctions/AppFunctionException) |||
|   |   |   | ↳ | [androidx.appfunctions.AppFunctionAppException](https://developer.android.com/reference/androidx/appfunctions/AppFunctionAppException) ||
|   |   |   |   | ↳ | [androidx.appfunctions.AppFunctionPermissionRequiredException](https://developer.android.com/reference/androidx/appfunctions/AppFunctionPermissionRequiredException) |

*** ** * ** ***

Thrown when the app lacks the necessary permission to fulfill the request.

This occurs when the app attempts an operation requiring user-granted permission that has not been provided. For example, creating a calendar event requires access to the calendar content. If the user hasn't granted this permission, this error should be thrown.

This is different from `https://developer.android.com/reference/androidx/appfunctions/AppFunctionDeniedException` in that the required permission is missing from the target app, as opposed to the caller.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionPermissionRequiredException#AppFunctionPermissionRequiredException(kotlin.String)(https://developer.android.com/reference/java/lang/String.html errorMessage)` |

### Inherited methods

From [androidx.appfunctions.AppFunctionException](https://developer.android.com/reference/androidx/appfunctions/AppFunctionException) `final https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appfunctions/AppFunctionException#getErrorMessage()()`

The error message.
From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html exception)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/annotation/RecentlyNullable
https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull Throwable[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintStream.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[] stackTrace)`

## Public constructors

### AppFunctionPermissionRequiredException

Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

```
public AppFunctionPermissionRequiredException(String errorMessage)
```