Module com.gluonhq.attach.pictures
Package com.gluonhq.attach.pictures.impl
Class IOSPicturesService
java.lang.Object
com.gluonhq.attach.pictures.impl.IOSPicturesService
- All Implemented Interfaces:
PicturesService
Note:Since iOS 10 requires
NSCameraUsageDescription
,
NSPhotoLibraryUsageDescription
and
NSPhotoLibraryAddUsageDescription
in pList.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the file associated to the original picture generated bytakePhoto(true)
or the file related to the picture selected withPicturesService.loadImageFromGallery()
.Optional<javafx.scene.image.Image>
Retrieve an image from the device's gallery of imagesstatic void
static void
Optional<javafx.scene.image.Image>
takePhoto
(boolean savePhoto) Use the device's camera to take a photo, and retrieve anImage
.static void
takePicture
(boolean savePhoto)
-
Constructor Details
-
IOSPicturesService
public IOSPicturesService()
-
-
Method Details
-
takePhoto
Description copied from interface:PicturesService
Use the device's camera to take a photo, and retrieve anImage
. It can be saved as well in the device's public album.- Specified by:
takePhoto
in interfacePicturesService
- Parameters:
savePhoto
- if true, image is saved to public album- Returns:
- an Optional with the Image or empty if it failed or it was cancelled
-
loadImageFromGallery
Description copied from interface:PicturesService
Retrieve an image from the device's gallery of images- Specified by:
loadImageFromGallery
in interfacePicturesService
- Returns:
- an Optional with the Image or empty if it failed or it was cancelled
-
getImageFile
Description copied from interface:PicturesService
Retrieve the file associated to the original picture generated bytakePhoto(true)
or the file related to the picture selected withPicturesService.loadImageFromGallery()
.- Specified by:
getImageFile
in interfacePicturesService
- Returns:
- an Optional with the File associated with the original image.
-
takePicture
public static void takePicture(boolean savePhoto) -
selectPicture
public static void selectPicture() -
setResult
-