# VisualVoicemailService.VisualVoicemailTask

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# VisualVoicemailTask

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/telephony/VisualVoicemailService.VisualVoicemailTask "View this page in Java")  

```
open class VisualVoicemailTask
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                               ||
| ↳ | [android.telephony.VisualVoicemailService.VisualVoicemailTask](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.VisualVoicemailTask#) |

Represents a visual voicemail event which needs to be handled. While the task is being processed telephony will hold a wakelock for the VisualVoicemailService. The service can unblock the main thread and pass the task to a worker thread. Once the task is finished,[VisualVoicemailTask.finish()](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.VisualVoicemailTask#finish())should be called to signal telephony to release the resources. Telephony will call[VisualVoicemailService.onStopped(VisualVoicemailTask)](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService#onStopped(android.telephony.VisualVoicemailService.VisualVoicemailTask))when the task is going to be terminated before completion.

## Summary

|                                                                                                                                                          Public methods                                                                                                                                                           ||
|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.VisualVoicemailTask#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br /> |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)           | [finish](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.VisualVoicemailTask#finish())`()` Call to signal telephony the task has completed.                                                       |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/telephony/VisualVoicemailService.VisualVoicemailTask#hashCode())`()` <br />                                                                                             |

## Public methods

### equals

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun equals(other: Any?): Boolean
```

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |

|                                                                           Return                                                                           ||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true`if this object is the same as the obj argument;`false`otherwise. |

### finish

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun finish(): Unit
```

Call to signal telephony the task has completed. Must be called for every task.  

### hashCode

Added in[API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun hashCode(): Int
```

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |