# Android Permission

### ✅ Android Permissions Explained

Each data collection feature in the Agent app requires specific Android permissions. The user must grant these permissions during or after installation to enable proper functionality.

| Feature                       | Required Android Permission(s)                                                | Purpose                                                       |
| ----------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------- |
| **GPS Location Tracking**     | `ACCESS_FINE_LOCATION`, `ACCESS_COARSE_LOCATION`                              | Get device's precise or approximate location                  |
| **Phone Contacts**            | `READ_CONTACTS`                                                               | Access and sync contact list                                  |
| **Call History (Phone Logs)** | `READ_CALL_LOG`, `READ_PHONE_STATE`                                           | Retrieve call records including time and duration             |
| **SMS Messages**              | `READ_SMS`, `RECEIVE_SMS` *(if applicable)*                                   | Read inbound and stored SMS messages                          |
| **Photos / Media**            | `READ_EXTERNAL_STORAGE` *(or `MANAGE_EXTERNAL_STORAGE` on Android 11+)*       | Access photos and media files for backup                      |
| **Browser History**           | Depends on browser type – may require `PACKAGE_USAGE_STATS` or special access | Read recent browser activity (Chrome, Samsung Internet, etc.) |
| **Ambient Voice Recording**   | `RECORD_AUDIO`                                                                | Record background audio using microphone                      |
| **Background Operation**      | `FOREGROUND_SERVICE`, `REQUEST_IGNORE_BATTERY_OPTIMIZATIONS`                  | Keep app running reliably in background                       |

> ⚠️ Some permissions, like SMS or Call Logs, are considered **“sensitive”** by Google and may require **user consent screens** or setup via **Accessibility Services** in modern Android versions.

***

### ❓ FAQs – Permissions in Agent App

***

**1. Why does the app ask for so many permissions?**\
Each permission corresponds to a specific feature (GPS, calls, photos, etc.). We only request the permissions necessary for the features you choose to enable.

***

**2. What happens if I deny a permission?**\
If you deny permission, the related feature will not work. For example, if location permission is rejected, GPS tracking will be disabled.

***

**3. Can I enable or disable permissions later?**\
Yes. You can go to your Android device settings:\
**Settings → Apps → \[Agent app] → Permissions**\
From there, toggle individual permissions at any time.

***

**4. Why do I see background or battery-related permission requests?**\
To function reliably in the background (e.g., send GPS updates every 15 minutes), the app may request battery optimization exemptions or background running permissions.

***

**5. Is granting `RECORD_AUDIO` safe? Will the app record secretly?**\
The app will only record ambient audio if you explicitly enable that feature from the Admin dashboard. All recordings are encrypted and tied to your account. Nothing is recorded without user control.

***

**6. What is the `PACKAGE_USAGE_STATS` Permission used for?**\
This permission allows the app to access usage information, such as app activity or browser history. It’s optional and only used for specific features.

***

**7. How do I grant permissions that Android blocks?**\
Some permissions (especially SMS, call logs) may be blocked by default on Android 10+. You may need to enable them via **Accessibility Settings** or use a guided setup process provided in the app.

***

**8. Are these permissions legal to request?**\
Yes — when installed on a device you own or manage, and with consent, requesting these permissions is allowed under Android’s app guidelines. Unauthorized use, however, is strictly prohibited.

#### 🔐 Android Device Owner Mode

Some advanced features in Agent require the app to be installed as a **Device Owner**. This is a special Android management mode that grants full control over the device, typically used by enterprise IT admins, parental control tools, or kiosk devices.

**✅ Benefits of Device Owner Mode:**

| Feature                                | Without Device Owner        | With Device Owner                           |
| -------------------------------------- | --------------------------- | ------------------------------------------- |
| Silent uninstallation via push         | ❌ Not allowed               | ✅ Supported                                 |
| Remotely toggle GPS                    | ❌ User must enable manually | ✅ Admin can force GPS on                    |
| Prevent app uninstallation             | ❌ User can uninstall        | ✅ App is uninstall-proof                    |
| Read phone logs on Android 10+         | ❌ Restricted                | ✅ Allowed via enterprise APIs               |
| Lock or restrict Settings / Play Store | ❌ No control                | ✅ Can enforce policies                      |
| Run in kiosk (single-app) mode         | ❌ Not possible              | ✅ Supported                                 |
| Apply policy to reset factory settings | ❌ No control                | ✅ Supported (e.g. factory reset protection) |

**⚠️ How to enable Device Owner mode?**

The agent app must be installed using one of the following provisioning methods:

* **QR Code Setup**
* **ADB Command:**

  ```
  pgsqlCopyEditadb shell dpm set-device-owner [agent-app]/.DeviceAdminReceiver
  ```
* **Zero-Touch / EMM enrollment** (for enterprise users)

> ⚠️ Device Owner **cannot be enabled after normal APK installation or via Play Store.** It must be set during initial setup or provisioning.


---

# Agent Instructions: 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:

```
GET https://phoneparental.gitbook.io/support/help/common-questions-faqs/agent-app/device/android-permission.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
