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.

domingo, 14 de agosto de 2016

Ionic Framework

Ionic is a framework based in HTML 5, the purpose of it is created a hybrid mobile app using the web technology like AngularJS.

How did you start using?

Ionic is simple to use, you only need to  install the following dependence in NodeJS:
  • npm install -g cordova
  • npm install -g ionic
Cordova, is which take the application and convert it in mobile application. When the npm finish to install the dependence you must provide the platform to be used with the command ionic platform add "platform" where platform should be android or ios.

How make application?

In back end is easy, because you make it with AngularJS, but the Front End you can visit this link http://ionicframework.com/docs/, in it you can find all the information about Ionic Desing.



Why used it?

The reasons why you should use it are:
  • Only need programming for one platform, because you can set up a new project with a different platform but using the same code.
  • You can view better the size of the back end in all the device size, because the browser has the option to see the responsive of a web page.
  • You can use variety of frameworks in the back end.
  • You can re-use a code of a web page and convert in mobile app.
So, take a risk and used it.