Reputation: 61
I am currently using react native image picker library to open camera , and I would like to add a message in the form of a snack bar or a toast message on top of the opened camera using the following function:
let result = await ImagePicker.launchCameraAsync({ allowsEditing: true, mediaTypes: ImagePicker.MediaTypeOptions.All, base64: true, //return base64 data., aspect: [1, 1], quality: 0.5 });
is it possible to do so using this library? to add a design or a view on top of current camera? or even the image taken by this camera from the library?
Upvotes: 1
Views: 844
Reputation: 91
I don't understand which message you want to show but, you can call a function with a button, there dispatch any kind of snackbar, alert, etc. Then launch the camera.
If you want to pick an image from gallery you need to call ImagePicker.launchImageLibraryAsync (both accept the same option params) https://docs.expo.dev/versions/latest/sdk/imagepicker/#usage
You can use two buttons to call each one, or one button with a selection camera/gallery pop up for the user.
Hope it
Upvotes: 0