Menu

CrashCourse: Ionic Framework and Phonegap, simple app..

Today I have to completely build a mobile application for the Drugstoc project. I am hoping I can complete it today in about 8 hours. I spent the weekend looking up and reading blogs and decided to go with Ionic Framework  . It built on AngularJS which Im a big fan of… Phonegap was a no brainer, Im not about to cook up a Native app with little knowledge of objective-C or Java. 

Prerequisites .

  1. Get the android SDK

Im starting with these blog posts

  1. Post 1
  2. Post 2

(I’m a Linux person, always assume my code samples will be written on a Linux PC, right now I use Fedora 20 and gnome 3.12)

Step 1

First step install ionic framework, cordova / phonegap. 

      sudo npm install -g ionic cordova

Step 2

Build and test your app locally with the commands below. 

    ionic platform add android
    ionic run android

For me, Google Android Emulator is slow and pretty much doesn’t respond properly to gestures and interactions (lags). I had two other options to try out.

  1. Genymotion 
  2. A physical device.

You need to enable usb debugging and make sure you’ve got you can find your device when you run “adb devices”; connect your device via a usb cable .

image

The string highlighted in red  or first part of the result is your device id. Run 

phonegap run android --device=YourDeviceID

That will launch / run the app in the device / emulator you select. I got something like this on Genymotion

image

Yup! Endddddd!

Well if you’ve gotten this far, and you are no front-end newbie, you should pic up just fine. Visit Ionic Framework’s get started page if you need help with using Ionic Frameworks Javascript and CSS UI Elements.

No comments

Leave a Reply

Follow us

Best Reviews

  • No Posts

ADS