Native APIs | Camera & Gallery: Settings
To use the Camera & Gallery sub-module you must first enable it. Go to Window > Easy Mobile > Settings, select the Native APIs tab, then click the toggle of the CAMERA & GALLERY section to enable and start configuring the sub-module.
Required Android Permissions
For this sub-module to function on Android, it is necessary to have the following permissions and features granted.
android.permission.WRITE_EXTERNAL_STORAGE
for save images into the device galleryandroid.hardware.camera
for accessing the device camera to take photos or record videos
Once you enable this submodule, these elements will be automatically added into your app's AndroidManifest.xml. When the app launches for the first time, a system popup will appear prompting the user to grant the permissions.
Required iOS Info.plist Keys
For this sub-module to function on iOS, the following keys must be added into the Info.plist file of your Xcode project. Failure to do so will cause the app to crash when using the Camera & Gallery API.
NSPhotoLibraryUsageDescription
for picking images from the photo libraryNSPhotoLibraryAddUsageDescription
for saving images into the photo libraryNSCameraUsageDescription
for taking pictures and recording videosNSMicrophoneUsageDescription
for sounds when recording videos
When building for iOS, Easy Mobile will automatically add these keys into the Info.plist file of the exported Xcode project. You must provide the string values (usage descriptions) for these keys in the REQUIRED IOS INFO.PLIST KEYS section.