lunes, 29 de agosto de 2016

Ionic and camera plugin bug

Some years ago people bought mobile phones to communicate, now they look for other features as the camera.

The camera is a important part of the cell phones so important that a lot of mobile aplication used it for work.


Ionic and camera Plugin

Ionic is a framework that used javascript to make android and apple applications. It has a integration with cell phone components, in this opportunity I'm talking is about the camera. For install the plugin you only need to run this command in NodeJS

cordova plugin add cordova-plugin-camera

You can find how implement the plugin in this site


Bug!BUG!

Yes, Ionic lets you use the device camera in our applications, but have a problem in the android
device, when the camare return the control to our application it back to the first screen, in other word the application crash. So, this bug happend because android put the app on hold, so the gargabe collector kill the app. 

The best way to solve the problem is installing the following plugin in this way

cordova plugin add https://github.com/mWater/cordova-plugin-wezka-nativecamera


The plugin not use the camera application of the device instead it simulated a camera so the application not on hold and gargabe collector not kill it.

No hay comentarios:

Publicar un comentario