Opening files
Opening files is not difficult; you just need to specify the path to the file, which should not be a full path like when getting a list of files and folders: /storage/emulated/0/DCIM/Camera/img.jpg - incorrect; /DCIM/Camera/img.jpg - correct.
This is just calling a new activity, because impossible to start activities from ContentProvider:
Kotlin
val intent = Intent()
intent.setClassName(
"com.anready.croissant",
"com.anready.croissant.providers.OpenFile"
)
intent.putExtra("path", pathToFile) // pathToFile = "/DCIM/Camera/img.jpg"
startActivity(intent)
By calling this method: It will return Nothing (at least for now)
That's it! Go to the next page