Skip to main content

Posts

Showing posts from 2015

Native Vs Phone gap, What to use and when and why?

Well,  Currently there are millions  of application available in app stores. In that  I would say ~10% of application are based on phone gap, remaining are native. Looking at the application requirement  and the time slice available for you have to bring it in market, you should decide what to choose. So, When you must choose only native development? If your application requires access to SYSTEM APIs, in that case its compulsory to use native. If you want to access of Bluetooth, file operations, storage,  running some background operations, accessing of AT commands, communications with hardware components such as LED, navigation buttons etc. If you are building  heavy games, running algorithms to do signal processing , image processing any such heavy operations These are some of the glimpse of task, where you must use native. Phone gap will never ever will be able to give you support of proper libraries for any of these. Now, It comes to Phone gap application developme

How to build an Android based phone gap application which supports all android Version?

As all we know, the very  first purpose of development of a phone gap based application is to support as much as platforms possible using a single code base. Though phone gap uses simple HTML, javascript and CSS, but Is it still enough to build an application which supports all android platforms. If you are using a phone KITKAT or LOLLYPOP based android phones for development, suddenly you will realize that your application  is not Jellybean and lower version. All Lists and buttons etc etc have gone Hayward. So How to correct this problem? Phone Gap has solve this problem in their very recent release using some crosswalk plugin.  Makes your Cordova application use the  Crosswalk WebView   instead of the System WebView. Requires cordova-android 4.0 or greater. Benefits WebView doesn't change depending on Android version Capabilities: such as WebRTC, WebAudio, Web Components Performance improvements (compared to older system webviews) Drawbacks Increase

Basic understanding of Android Fragments and its State

What is Fragment and why did it come into existence? Fragment is one of the highly used class/component in the current mobile and Tab application development. Its has increased the development and usability up to a right scale.   Android introduced fragments in Android 3.0 (API level 11), primarily to support more dynamic and flexible UI designs on large screens, such as tablets. Because a tablet's screen is much larger than that of a handset, there's more room to combine and interchange UI components. Fragments allow such designs without the need for you to manage complex changes to the view hierarchy. By dividing the layout of an activity into fragments, you become able to modify the activity's appearance at runtime and preserve those changes in a back stack that's managed by the activity. For example, a news application can use one fragment to show a list of articles on the left and another fragment to display an article on the right—both fragments appea

Building Phone Gap App for Windows Phone 8

Before you start  developing an phone gap based App you need to keep following things in your mind. General Practice: Set any controls height and width always in term of percentage. Same should be applied with Div. Don't use margin at all. Use margin only to give spacing with controls- 5 px - 20 px Design a parent page.Only this page should contain head and body tag. Other layout should only contain div. After that only Remove and Append Div based on the required layout. Use boot strap to provide a web-responsive feature to your application Above practice will help you building a nice android and IOS application. but in-case of windows application same application won't work as it is. Things to take care in Phone Gap based Application. All append function will start throwing security Exceptions Use the following tag around your append code. MSApp.execUnsafeLocalFunction( function () { var body = document.getElementsByTagName( 'body' )[0]; body

What is the difference b/w Service and Intent service in android?

Service :  The Service can be used in tasks with no UI, but shouldn't be too long. If you need to perform long tasks, you must use threads within Service.  The Service is triggered by calling method startService( ) . The Service runs in background but it runs on the Main Thread of the application. The Service may block the Main Thread of the application. If you implement a Service , it is your responsibility to stop the service when its work is done, by calling stopSelf() or stopService() . (If you only want to provide binding, you don't need to implement this method).   Intent Service :  The IntentService can be used in long tasks usually with no communication to Main Thread. If communication is required, can use Main Thread handler or broadcast intents. Another case of use is when callbacks are needed (Intent triggered tasks). The IntentService is triggered using an Intent, it spawns a new worker thread and the method onHandleIntent() is called on

Build a Phone gap android App deployable into google play store

Build the application in debug mode Go inside the folder :  "platforms/android/assests/www/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/test/fixtures/" And delete all the files Open Cmd prompt in administrator mode Go inside folder : "platforms/android/cordova" Type :   "build --release" and press enter . Now check the path of  keytool.exe in your PC : C:\Program Files\Java\jre1.8.0_45\bin Using command prompt go inside the folder and type the following command Generate a private key using   keytool . For example: $ keytool - genkey - v - keystore my - release - key . keystore - alias alias_name - keyalg RSA - keysize 2048 - validity 10000 Change the red highlighted text as per requirement. Press enter and fill the asked information. Please do remember the alias name and password asked during t

Phone Gap basic understanding: what and how?

           Before We start lets understand What is phone gap ? Building applications for each device–iPhone, Android, Windows Mobile and more–requires different frameworks and languages. PhoneGap solves this by using standards-based web technologies to bridge web applications and mobile devices. Since PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve. How it works?  PhoneGap applications are developed using HTML, CSS, and JavaScript, however the final product of a PhoneGap application is a binary application archive that can be distributed through standard application ecosystems. PhoneGap provides an application programming interface (API) that enables you to access native operating system functionality using JavaScript. You build your application logic using JavaScript, and the PhoneGap API handles communication with the native operating system. Lets see we are good to Start:  Phone gap supports the followings features