abstracted onCamera logic