# 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 %}
