# Get Task Status

Every call to Ignite returns a task ID that you can track using the `getTaskInfo()` method. To track task information, ensure that you are authenticated and is using a valid token.

{% code title="Kotlin" %}

```kotlin
fun getTaskInfo(
taskId: String,
callback: IResponseCallback<TaskInfoResponse, Error, Progress>? = null,
metadata: Bundle = Bundle()
)
```

{% endcode %}

| PARAMETER  | STATUS   | TYPE      | DESCRIPTION                                                                                                                |
| ---------- | -------- | --------- | -------------------------------------------------------------------------------------------------------------------------- |
| `taskId`   | Required | String    | Unique ID for the task you want to receive details about. Obtain the task ID from either a previous callback or broadcast. |
| `callback` | Required | Interface | The DTIS SDK includes the `IResponseCallback` interface for you to receive task status updates.                            |
| `metadata` | Optional | Bundle    | Metadata for additional processing.                                                                                        |

### Callback Responses <a href="#id-01h7zrjzxzrp7gyebppryvqvch" id="id-01h7zrjzxzrp7gyebppryvqvch"></a>

The `getTaskInfo()` method returns the following information:

* taskID
* Task Status
* Status Code

| STATUS       | CODE | DESCRIPTION                               |
| ------------ | ---- | ----------------------------------------- |
| IN\_PROGRESS | 0    | Task is running.                          |
| STARTED      | 1    | Task has begun.                           |
| FINISHED     | 3    | Task is complete.                         |
| FAILED       | 4    | Task failed to complete.                  |
| CANCELLED    | 5    | Task has been cancelled.                  |
| QUEUED       | 6    | Task is queued to run.                    |
| POSTPONED    | 7    | Task is postponed to run at a later time. |

### Example <a href="#id-01h7zr7vh54s9ytjccg81rz33v" id="id-01h7zr7vh54s9ytjccg81rz33v"></a>

{% code title="Kotlin" %}

```kotlin
// Initialization

IgniteServiceSdk.instance().getTaskInfo(taskId, callback: IResponseCallback<TaskInfoResponse, Error, Progress> {
    override fun onSuccess(result: TaskInfoResponse) {
        Log.i(TAG, "Get task information onSuccess(): applicationPackageName: ${result.taskInfo.applicationPackageName} status ${result.taskInfo.status}, ${result.taskInfo.progressValue}")
    }

    override fun onError(error: Error) {
        Log.e(TAG, "Get task information onError(): ${error.message}"")
    }
})
```

{% endcode %}


---

# 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.digitalturbine.com/dt-ignite/ignite-services/sdk-reference/get-task-status.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.
