# Registering the Application

To make the phone recognize your new application, you must register it using the exported function in your `client/main.lua`.

<details>

<summary><strong>Icon Background Object</strong></summary>

{% code overflow="wrap" lineNumbers="true" %}

```lua
{
    angle = 45,
    colors = { "#FF0000", "#0000FF" }
}
```

{% endcode %}

</details>

<details>

<summary><strong>Job Object</strong></summary>

{% code overflow="wrap" lineNumbers="true" %}

```lua
{
    name = "police",
    grade = 0
}
```

{% endcode %}

</details>

#### AddApplication

Registers a new application icon on the home screen.

{% code overflow="wrap" lineNumbers="true" %}

```lua
exports['17mov_Phone']:AddApplication(appData)
```

{% endcode %}

<table><thead><tr><th width="157" align="center">Property</th><th width="190" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td align="center"><code>name</code></td><td align="center">string</td><td>Unique identifier for the application.</td></tr><tr><td align="center"><code>label</code></td><td align="center">string</td><td>The display name shown under the icon.</td></tr><tr><td align="center"><code>ui</code></td><td align="center">string</td><td>URL to the app's <code>index.html</code>.</td></tr><tr><td align="center"><code>icon</code></td><td align="center">string</td><td>Path to the icon image.</td></tr><tr><td align="center"><code>iconBackground</code></td><td align="center">string | object</td><td>The <a href="#icon-background-object"><strong>Icon Background Object</strong> </a>or HEX VALUE</td></tr><tr><td align="center"><code>default</code></td><td align="center">boolean</td><td>If <code>true</code>, the app cannot be uninstalled and is preinstalled</td></tr><tr><td align="center"><code>preInstalled</code></td><td align="center">boolean</td><td>If <code>true</code>, the app is installed by default on new phones.</td></tr><tr><td align="center"><code>resourceName</code></td><td align="center">string</td><td>The name of your resource</td></tr><tr><td align="center"><code>rating</code></td><td align="center">float</td><td>Store rating (1-5)</td></tr><tr><td align="center"><code>job</code></td><td align="center">object</td><td>The <a href="#job-object">Job Object</a><a href="#icon-background-object"> </a>or nil. This parameter is optional. Here you can restrict app to certain jobs</td></tr></tbody></table>

#### RemoveApplication

Works only for external apps

{% code lineNumbers="true" %}

```lua
exports['17mov_Phone']:RemoveApplication(data)
```

{% endcode %}

<table><thead><tr><th width="157" align="center">Property</th><th width="190" align="center">Type</th><th>Description</th></tr></thead><tbody><tr><td align="center"><code>name</code></td><td align="center">string</td><td>Same name as in AddApplication</td></tr><tr><td align="center"><code>resourceName</code></td><td align="center">string</td><td>Resource name that registered the app</td></tr><tr><td align="center"><code>uninstall?</code></td><td align="center">boolean</td><td>Whether or not uninstall app from player phone (If this is not set to true, you'll remove app temporary, if it has preInstalled or default value it will automatically install itself again</td></tr></tbody></table>

### Locales

We've introduced system that lets you translate AppName or description in store via locales - depends what language user selects, description and name can be different. In order to do this, you need to specify new locales in locale:<br>

* `Appname:Title` - For changing titles. Please be aware that AppName needs to be capitalized - that means only first letter can be uppercase
* `Store:Appname:Description` - For changing description. Please be aware that AppName needs to be capitalized - that means only first letter can be uppercase


---

# 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://docs.17movement.net/phone/building-custom-apps/registering-the-application.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.
