> For the complete documentation index, see [llms.txt](https://docs-old.telematicssdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-old.telematicssdk.com/sdk-installation/android-sdk-installation/setup-and-enabling-sdk/permissions-dialog.md).

# \*Permissions dialog

## Overview

Permissions **Dialog** is DialogFragment (non-fullscreen popup window) with buttons for request permissions and show granted status for them.

![](https://lh6.googleusercontent.com/9MkFVHN3HWwJPrPeGosJuQ9XFbVKmgiQYGdtR_LfxhHm36nzlY0Y8EAqBxvfd6yw_WWtlzQ7WRDyUA-lsO0zQrde8YSjThfZTGcVWelRp8zz3JvA50Dac1nJa6IFMw)

To start dialog from your activity or fragment use the code below:

```kotlin
private var permsFragment: PermissionsDialogFragment? = null
override fun onCreate(savedInstanceState: Bundle?) {
   super.onCreate(savedInstanceState)
   permsFragment = PermissionsDialogFragment.newInstants(dismissIfAllGranted =
false)
   permsFragment?.setPermissionsGrantedListener(object :
PermissionsDialogFragment.PermissionsGrantedListener {
       override fun onGrantedStatus(allPermsGranted: Boolean) {
           if (allPermsGranted) enableSDK() // enabled SDK if not enabled
       }
   })
}
private fun showPermissionsDialog() {
   permsFragment?.let {
       if (!permsFragment!!.isVisible) permsFragment?.show(supportFragmentManager, PermissionsDialogFragment.PERMISSION_FRAGMENT_TAG)
   }
}

```

Where **dismissIfAllGranted** flag you set to **true** and dialog will be dismissed (closed) automatically when all permissions are granted. If flag is **false** dialog will not be disappeared when all permissions granted, user can do it by himself.

## Customizing

### Colors

**values\colors.xml**

```markup
<!-- Permission Dialog Fragment -->
<color name="colorTelematicsDialogBackground">#fff</color>
<color name="colorTelematicsDialogPrimaryText">#494949</color>
<color name="colorTelematicsDialogSecondaryText">#80464646</color>
<color name="colorTelematicsDialogButtonText">#494949</color>
<color name="colorTelematicsDialogButtonNorm">#fff</color>
<color name="colorTelematicsDialogButtonPressed">#80464646</color>
```

### **Dimens**

**values\dimens.xml**\
**values-xhdpi\dimens.xml**\
**values-xxhdpi\dimens.xml**&#x20;

```markup
<!-- Overrided DialogFragment SDK resources -->
<dimen name="dialog_telematics_view_bubble_corners">20dp</dimen>
<dimen name="dialog_telematics_button_corners">35dp</dimen>
```

```markup
<!-- Overrided Wizard SDK resources -->
<dimen name="wizard_telematics_button_corners">5dp</dimen>
```

### Drawables

**values/drawable-xxxhdpi**

Granted permission image:

![ic\_telematics\_ok.png (60x60)](/files/-MUmgpMNNtRiJHBdPSAH)

Location permission image:

![ic\_telematics\_map\_geo.png (72x72)](/files/-MUmh0dJ9JuR0AX_AM10)

Physical activity permission image:

![ic\_telematics\_motion.png (72x72)](/files/-MUmhEliQaH9PlGkM4FT)

Background optimization permission screen:

![ic\_telematics\_background\_tracking.png (72x72)](/files/-MUmhzuakDUssB2EvIaF)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-old.telematicssdk.com/sdk-installation/android-sdk-installation/setup-and-enabling-sdk/permissions-dialog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
