Skip to content

Instantly share code, notes, and snippets.

@Priyansh-Kedia
Created September 15, 2021 09:52
Show Gist options
  • Save Priyansh-Kedia/e60993a77759282038bf946021d33c66 to your computer and use it in GitHub Desktop.
Save Priyansh-Kedia/e60993a77759282038bf946021d33c66 to your computer and use it in GitHub Desktop.
Companion object in UploadService
companion object {
/**
* Unique job ID for this service.
*/
const val JOB_ID = 1000
const val IMAGE_URI = "image_uri"
const val IMAGE_URL = "image_url"
const val DOCUMENT_URI = "document_uri"
const val DOCUMENT_URL = "document_url"
/**
* Convenience method for enqueuing work in to this service.
*/
fun enqueueWork(context: Context, work: Intent?) {
enqueueWork(context,
UploadService::class.java, JOB_ID,
work!!)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment