modified how to add photos from gallery so it also works on api 19