Skip to content

Instantly share code, notes, and snippets.

@root-ansh
Created September 7, 2025 10:45
Show Gist options
  • Select an option

  • Save root-ansh/fbb9bbe2a9eccf90c8222f6493217666 to your computer and use it in GitHub Desktop.

Select an option

Save root-ansh/fbb9bbe2a9eccf90c8222f6493217666 to your computer and use it in GitHub Desktop.
lifecycleScope.launch {
val uri = context.saveBitmapToUserMemory(getCurrentImageViewBitmap())
val uri = context.saveFileToUserMemory(file)
Snackbar
.make(binding.root,"Saved file :currentlyVisibleImage to downloads", Snackbar.LENGTH_SHORT)
.setAction("show"){context.openSystemViewerForSAFUri(uri)} //check next section for info on this
.show()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment