Ionic 3 Camera Native - Take Picture (1)

preview_player
Показать описание
Ionic 3 - how to take picture using camera (native)

Official documentation

Tutorial 1: Take Picture

Tutorial 2: Pick Image From Gallery

Tutorial 3: Upload Image to Server

All code of this project
-------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

Hello friend, I have seen your video and in the options you use DATA_URL to show the image, currently ionic 3 shows in your documentation:

const options: CameraOptions = {
  quality: 100
  destinationType: this.camera.DestinationType.FILE_URI,
  encodingType: this.camera.EncodingType.JPEG,
  mediaType: this.camera.MediaType.PICTURE
}

this.camera.getPicture (options) .then ((imageData) => {
 // imageData is either a base64 encoded string or a file URI
 // If it's base64 (DATA_URL):
 let base64Image = 'data: image / jpeg; base64, ' + imageData;
}, (err) => {
 // Handle error
});

and this FILE_URL in the options, according to ionic I recommend using this option, but if this does not show the image, can you tell me what I have to do to show the image from FILE_URL? or make a video about that? greetings and thanks for your videos

danielchirinosr
Автор

Hi, I followed the complete code guided by you but on my side, this.camera object is undefined when I build my app and install in mobile phone and when I use window['plugins'].camera then its work fine. Pleae tell me why is this problem?

Thanks & Regards,
Rahul

rahulmanariya
Автор

hi, i just wondering where this method can be used for creating 360° images?

thyagarajthanaraj
Автор

And also please make a video on CameraPreview plugin, it is not also working at my end. Please guide me.

rahulmanariya
Автор

hello thank you
cropimage method is not working it is like takeimage method please check

kanaan
Автор

is Android sdk required to build the app?

SunilSahu-licy
Автор

i tried the same but my application gets restared once i click the image from camera can you please help me in that

ravirajtiwari
Автор

Hi you now how to display the image in canvas

edgarpintoy
Автор

image not loading. can someone help? i just followed the code

aldenhernandez
Автор

I used the same code, but it wont display the image, and it says refused to load image.

aqc
Автор

What is the name of the android emulator ?

tommyc