Can I automate the process of taking photographs via my app

My app is s photography app and I want to automate the ability to take photos.Is this possible at all via appium ? If possible please let me know the details. I assume this is applicable on real devices.If hack exists for simulators,I will be interested to learn

I want to automate for both the iOS and Android apps.