Skip to content

Instantly share code, notes, and snippets.

@fercarcedo
Created February 20, 2020 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fercarcedo/ab3ba94553648f3d88b63b7c1e2d9fb2 to your computer and use it in GitHub Desktop.
Save fercarcedo/ab3ba94553648f3d88b63b7c1e2d9fb2 to your computer and use it in GitHub Desktop.
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQ_CODE && resultCode == Activity.RESULT_OK) {
val intent = Intent(this, MyService::class.java)
intent.data = uri
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)
startService(intent)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment