Friday, February 26, 2016

How to run ionic on real device.

Are you developing an apps with ionic and planning to deploy it on a real device ?  Cool !
Here are some  steps that you may follow to get it running on your device out of the box.
  1. Make sure that the Developer Option of your Phone is activated, if not here is a tutorial to help you out.     http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html
  2. Connect your phone to the computer with a USB cable.
  3. Make sure your phone is open and not locked.
  4. Open the terminal and navigation to your main project directory. You should now see sometime like the below content. > cd  HelloIonicProject 
  5. Adding your current platform - if Android :  > ionic platform add android
  6.  Adding your current platform - if ios :  > ionic platform add ios
  7.  Now it is time to build our project on it. if android : > ionic build android
  8. Now it is time to build our project on it. if ios :  > ionic build ios
  9. Your may do this, to copy all the files into the specified platform : > cordova prepare
  10. Finally run it for android : > ionic run android
  11. Finally run it for ios : > ionic run ios
Hope you make it !

Thursday, February 25, 2016

change ionic address

If you are using ionic there are times where you would like to switch between network interfaces. Either from localhost to a static ip, to a wireless network and so on. By the running the following ionic command, all network interfaces your PC is connected to , are scanned and you presented with a list from you have to choose by typing just a number (1,2,3,..).

> ionic address


You are prompted with :


Here I choose the localhost by typing 3.

Hope it suits your query..

Monday, February 15, 2016

Why does a Servlet has no constructor ?

A Servlet class does not have a constructor because a programmer never instantiate it. Rather the container creates instances whenever it is  needed.