Use image file as camera I need to use an image file instead of a camera for Android apps that want you to use a camera app to take a photo (for example, Google Drive scanner). I don't need to use apps that use the camera directly, such as WhatsApp.

The question was edited so it matches the answers. See edit history to see the actual question.
There are 3rd-party "fake camera" apps that will let you to choose an image instead, such as:


Image2Camera (free)
Fake Camera by New Horizon Apps (free)
Fake Camera - donate version by Vaclav Balak (paid)


Note that you need to have the image inside the (emulator) device storage first for these apps to be useful.

Also, since these apps are not really a camera app, opening the apps directly won't be really useful (other than, perhaps, to read the instruction for app usage). Instead, when you want to take a picture from an app, these apps will be selectable as "camera" app instead, then you can select the image on the device.

Disclaimer: I'm not affiliated with any of these apps.