Free Information Technology Magazines and eBooks

Friday, August 01, 2014

How to Debug PhoneGap From Command-Line Interface

If your prefer debugging PhoneGap app using the console or terminal then you just need to remember the following.


1. Add console plugin on your phonegap project.

$ cordova plugin add org.apache.cordova.console

2. On your code, use console.log to display something.

console.log('Im Ready!');

3. Use the following command lines to open the Android Console.


Monday, July 21, 2014

Developing Chrome App: localStorage Versus chrome.storage.local

Developing Chrome App: localStorage Versus chrome.storage.local
I have been playing around with Chrome App development for a while now. By the way, Chrome app is written in HTML5, CSS and Javascript, pretty the same way web apps are written but they behave and look more like native apps. I was able to port one our business app to chrome app and it is now available in Chrome Web Store for download. I also plan to publish my own Chrome App tutorial for beginners next week if I am able to find some time to do it. For now, I want to share one of the changes you should take note of when switching to chrome app development.

Local Storage

If your a HTML5 developer, you may be very familiar with localStorage object, which certain browsers refer it as "Local Storage" or "DOM Storage". This is what you need if you like to store named key/value pairs locally, within client web browser. Unfortunately localStorage object is no longer supported by chrome app. Instead you have to use chrome.storage.local. Here are the differences between the two:

Saturday, July 05, 2014

Can't Turn On WIFI on Toshiba Satellite L740

Last night, I'm trying to enable the WiFi of my Toshiba laptop by pressing FN+F8 key. Whenever you press FN key on Toshiba Satellite laptop, a popmenu appears above the screen. Toshiba calls it FlashCards. I don't know what happened but the flash cards doesn't appear when I hit FN. I tried running diagnostic tools and it detected that my WiFi device is still turn off. I don't know any alternative way to turn it on so it was frustrating. After some research, I did find a solution. To manually bring back the flash cards, just follow these steps after the jump.


Tuesday, February 18, 2014

How To Open URL Schemes In iOS and Android Via Email

How To Open URL Schemes In iOS and Android Via Email
Most of our in-house applications have email notification feature. Each email has links to specific web application so user can respond to the action required. For example, some email notification requires user to approve or disapprove documents. User need to click these links to perform an action. Since mobile device is now more popular to our users, we intend to enhance these email notifications to interact with our own mobile app when it is installed on the user's mobile. Fortunately, iOS and Android supports URL Schemes. But ofcourse, implementing it to interact with Email is a little bit more complicated. Let start with iOS tweak after the jump.

Monday, February 17, 2014

Submission to iOS App Store Stuck For Hours

I just updated one of my app in iOS and when I was ready to submit it to App Store, I hit the Distribute button in Organizer->Archieves to commence the submission. After a while, I noticed that the submission is stuck on the last stage of the process. I ignored it thinking that maybe Apple server is just busy at the moment. I left the XCode on the submission screen and went for dinner. When I got back I was surprise that it hasn't finish yet and then thats when I suspected that something is wrong. After few research I found the solution after the jump.

Tuesday, January 28, 2014

Upload File To SQL Server Database Using ASP.NET Generic Handler and JQuery

My last post was about uploading files with JQuery and ASP.NET generic handler. Today I want to revise the Asp.NET handler to upload the file directly to a SQL Server database.


Upload File To SQL Server Database Using ASP.NET Generic Handler and JQuery

The trick here is on the following functions after the jump.

Friday, January 03, 2014

Upload Documents Using JQuery and ASP.NET ASHX Handler

Upload Documents Using JQuery and ASP.NET ASHX Handler
Recently I needed to write code for uploading documents. I already posted similar requirement for Phonegap but this time I'm coding it for web apps using JQuery and HTML. Fortunately I don't have to create my own. After some searching, I found this framework although there is no direct example on how to use it on ASP.NET backend. After some more digging, I stumbled on this ASP.NET example using the same framework. It is exactly what I need. After tweaking it a bit, I was able to run it on my development server running IIS 7. You can download the full source code after the jump

Thursday, October 24, 2013

Uploading File With Phonegap and ASP.NET Web Service

Although there is a written documentation on How to transfer file in Phonegap, there is no direct example on how to implement it with ASP.NET as backend. It is pretty easy actually.

1) Lets create an ASP.NET Web Service. It should look like this:
 using System;  
 using System.Collections.Generic;  
 using System.Linq;  
 using System.Web;  
 using System.Web.Services;  
 /// <summary>  
 /// Summary description for WebService  
 /// </summary>  
 [WebService(Namespace = "http://tempuri.org/")]  
 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]  
 // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.   
 // [System.Web.Script.Services.ScriptService]  
 public class WebService : System.Web.Services.WebService {  
   public WebService () {  
     //Uncomment the following line if using designed components   
     //InitializeComponent();   
   }  
   [WebMethod]  
   public string UploadFile() {  
     string lreturn = "success";  
     try  
     {  
       HttpPostedFile file = HttpContext.Current.Request.Files["myfile"];  
       string saveFile = file.FileName;  
       file.SaveAs(saveFile);  
     }  
     catch (Exception ex)  
     {  
       lreturn = "fail. " + ex.Message;  
     }  
     return lreturn ;  
   }  
 }  

Take note of the HttpPostedFile class. It does the magic and take cares of the uploading. And the next step is to build our front end.

Wednesday, October 16, 2013

How to Enable Your Web App To Upload Files From Mobile Device

Most of uploading scripts are designed for desktop web browser. It may or may not work in mobile device platforms such as Android and iOS. It is a lot more complicated on iOS platform since it has no common folder for files unlike Android. But ofcourse there is a way and here are some of the solutions I already used before.

1. Plupload API - an opensource script to upload files using HTML5, Silverlight, Flash, BrowserPlus or normal forms, providing some unique features such as upload progress, image resizing and chunked uploads.

Tuesday, August 27, 2013

Web App Dashboard Project Using Jquery

One of our latest project is to develop a dashboard app that will alert our operations people on what's going on with our business in realtime. The dashboard should display gauges of critical data that have to be monitored. Some of these data are:

- Average Service Time
- Warehouse Utilization
- Production Efficiency
- Overstaying Cargo


Aside from gauges, the app should also display the following:
- Marquee message of important alerts.
- Weather

Download the self explanatory sourcecode after the jump.