Stay organized with collections
Save and categorize content based on your preferences.
StopTetheringCallback
interface StopTetheringCallback
Callback for use with stopTethering
to find out whether stop tethering succeeded.
Summary
Public methods |
open Unit |
Called when starting tethering failed.
|
open Unit |
Called when tethering has been successfully stopped.
|
Public methods
onStopTetheringFailed
open fun onStopTetheringFailed(error: Int): Unit
Called when starting tethering failed.
onStopTetheringSucceeded
open fun onStopTetheringSucceeded(): Unit
Called when tethering has been successfully stopped.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-13 UTC."],[],[],null,["# TetheringManager.StopTetheringCallback\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nStopTetheringCallback\n=====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/TetheringManager.StopTetheringCallback \"View this page in Java\") \n\n```\ninterface StopTetheringCallback\n```\n\n|---------------------------------------------------------|\n| [android.net.TetheringManager.StopTetheringCallback](#) |\n\nCallback for use with [stopTethering](/reference/kotlin/android/net/TetheringManager#stopTethering(android.net.TetheringManager.TetheringRequest,%20java.util.concurrent.Executor,%20android.net.TetheringManager.StopTetheringCallback)) to find out whether stop tethering succeeded.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStopTetheringFailed](#onStopTetheringFailed(kotlin.Int))`(`error:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when starting tethering failed. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStopTetheringSucceeded](#onStopTetheringSucceeded())`()` Called when tethering has been successfully stopped. |\n\nPublic methods\n--------------\n\n### onStopTetheringFailed\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onStopTetheringFailed(error: Int): Unit\n```\n\nCalled when starting tethering failed.\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `error` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The error that caused the failure. Value is [android.net.TetheringManager#TETHER_ERROR_NO_ERROR](/reference/kotlin/android/net/TetheringManager#TETHER_ERROR_NO_ERROR:kotlin.Int), or [android.net.TetheringManager#TETHER_ERROR_UNKNOWN_REQUEST](/reference/kotlin/android/net/TetheringManager#TETHER_ERROR_UNKNOWN_REQUEST:kotlin.Int) |\n\n### onStopTetheringSucceeded\n\nAdded in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onStopTetheringSucceeded(): Unit\n```\n\nCalled when tethering has been successfully stopped."]]