White blank screen issue


#1

When i’m using this below code my application showing a blank white screen

onTake(){
 const options: CameraOptions = {
    quality: 80,
	allowEdit: true,
	sourceType: this.camera.PictureSourceType.CAMERA,
	saveToPhotoAlbum: false,
	correctOrientation: true,
	encodingType: this.camera.EncodingType.JPEG,
	destinationType: this.camera.DestinationType.FILE_URI
}
this.camera.getPicture(options).then((imageData) => {
  if (this.platform.is('android')) {
  this.ImageData = imageData.replace(/^file:\/\//, '');
  }
  else {
  this.ImageData = imageData;
  }
  this.photos.push(this.ImageData); //if you have to show multiple image
  this.photos.reverse();
          
}, (err) => {
    // Handle error
});
}

.html

<ion-row>
    <ion-col col-3 *ngFor="let photo of photos; let id = index">
                    <ion-card class="block">
                      <ion-icon name="ios-close-circle-outline" class="deleteIcon" (click)="deletePhoto(id)"></ion-icon>
                      <img [src]="photo" *ngIf="photo" />
                    </ion-card>
    </ion-col>
</ion-row>

please help me out how can i fix it
Thanks


#2

Hybrid Mobile App or PWA?

See: iOS 11 its not me its you (tags: iOS11, PWA, Camera)


#3

Hybrid Mobile App. Please give me a example of code i’m new in ionic 2


#4

See: https://www.joshmorony.com/blog/


#5

there is my code its working fine

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

this.camera.getPicture(options).then((imageData) => {
 this.ImageData = 'data:image/jpeg;base64,' + imageData;
     this.photos.push(this.ImageData); //if you have to show multiple image
}, (err) => {
 // Handle error
});
}

now i’m want to send multiple images to the server
please tell me how can i do that?


#6

My recommendation for you is switching to Capacitor.
Capacitor ships with a brand new splash screen plugin of its own. It will no longer use Cordova splashscreen.
I think that’s the most exciting change ever.

Cordova splash screen will always display white blank screen and gray blank screen. There’s no way to completely stop this behavior on all devices.