Created
August 16, 2019 15:20
-
-
Save kathisai/4e888970a1f9f4327dbd52f325d0b8ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExampleService : IntentService("ExampleService") { | |
| override fun onHandleIntent(intent: Intent?) { | |
| // Normally we would do some work here, like download a file. | |
| // For our sample, we just sleep for 5 seconds. | |
| try { | |
| Thread.sleep(5000) | |
| } catch (e: InterruptedException) { | |
| // Restore interrupt status. | |
| Thread.currentThread().interrupt() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment