Skip to main content

Posts

Showing posts with the label Cordova

JS: Open on InAppBrowser for Cordova/Phonegap based mobile application

There is requirement when we want to load the external link inside our mobiapp. So to ease the process I have created a class that will help in achieving it. You just have to create an instance of it. That's it! var OpenOnInAppBrowser = function () { window.name = "projectname"; var iabRef = null; window.notifier = { flag: false, start: function() { if(!window.notifier.flag) { window.notifier.flag = true; navigator.notification.activityStart('Loading!', 'Please wait ...'); } }, stop: function() { window.notifier.flag = false; navigator.notification.activityStop(); } } var iabLoadStart = function (event) { console.log('OpenOnInAppBrowser -> iabLoadStart: ' + event.type + ' - ' + event.url); window.notifier.st...

Cordova: Android Log Viewer

This particular blog is devoted to the Android Log Viewer . It is a very useful tool when you are working with Cordova/Phonegap via command-line interface (CLI).  When a developers like you are working on CLI which is recommended by even Cordova team then the most important thing that you are going to face is that how to debug an application. Now you have an option to use eclipse, but then question arise that why the hell you are using CLI.  So the easiest choice would be to use a separate log viewer like this. Of course, the CLI would be very light weight and could work on less powerful machine as well. If you have bought a machine few years back then it might not handle currently available processing intensive applications very well. Thus the only choice left was to use CLI. But you will feel the power and beauty of this once you'll get used to it.  

Streamlining the mobile-app development process in the large team scenario

Every time a file gets added to the project, it adds-up an extra latency in the file loading. So minimizing the number of files in the release-build would definitely enhance the performance of the app. Considering this fact, we should have only one stylesheet containing all the styles related to the app. Though putting everything (style class) in single file would definitely have the following effects Pros: It would make it  compact,  easy to load,  one-time loading  Cons: It would make it  lengthy for manual readability; Thus we need to make it modular, that means, a separate stylesheet need to be made for each module; which is easy to modify & debug for developers. Each stylesheet should follow the standard guidelines like adding a module-name prior to the style class name,  avoiding id based style class, etc. To enforce the developers to follow the standard guidelines, we can also use a css generator system. Where developers...

How to configure Android Developer Tools for Cordova/Phonegap use?

If you are reading this blog then you might be be searching for an IDE (Integrated Development Environment) to develop Cordova or Phonegap applications on Android platform. So you have come at the right place. So, how do we acheive that? Well, you need to follow these steps: Download latest ADT from this link:  Get the Android SDK Install it of your development machine Open it up In menu bar go to the Help → Install New Software... A popup window appears, in which you need to click the Add... button A small sub-popup form appears, that you need to fill as: Name : WTP  Location : http://download.eclipse.org/webtools/repository/juno/ Click on the Ok button after filling up the form After closing the sub-popup form, a list appears in the table, where user is suppose to check the items that they need to install. To configure it for Cordova you would require editor for HTML, JS, CSS, XML, so first select the Web Tools Plaform (WTP) 3.4.2   Now check these it...