What is the preferred method to add photos to an app at run-time. I need to allow a user to either take a new photo with the camera or choose an existing photo. The photo will be stored in an SQLite database. When the photo is shown on the screen I need it to resize in both directions whenever the app runs on a larger or smaller screen so it is not distorted.
Saving the images at runtime as a b64 string in SQLite will work. If there are a lot of images, or if they are large, you might want to keep them on the server.
You’ll need display them in a container with the right aspect ratio. If you change the size of the container, you’ll need to adjust both the height and width accordingly.
If you’re using PhoneGap, you can also save the photos to the file system.