Free Information Technology Magazines and eBooks

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 = "")]  
 [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   
   public string UploadFile() {  
     string lreturn = "success";  
       HttpPostedFile file = HttpContext.Current.Request.Files["myfile"];  
       string saveFile = file.FileName;  
     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.

Wednesday, July 31, 2013

Painful changes in Phonegap / Cordova 3.0

I have been using Phonegap to develop two of my latest mobile app for Android. Specifically, I used version 2.6 and 2.8. Yesterday I tried porting one my android app to iOS and I decided to use the latest Phonegap 3.0. I was able to do so but I had to experience the following painful changes of the new release.

1. Instead of the old fashion way of downloading the SDK, the default Cordova download and installation is via Node Package Manager (npm). This is more difficult if your not a Terminal kind of guy.

To download 3.0 package, just open your Terminal and enter the following command:
$ sudo npm install -g phonegap

2. Creating new Project is not on XCode. Yes it is also on the Terminal.

Just execute the following commands:
$ phonegap create my-app
$ cd my-app
$ phonegap run ios

After that, you may open generated .xcodeproj file using XCode.

Thursday, July 25, 2013

How To Delete Path, Circle, Polygon or Marker in Leaflet JS Map

I was looking over the internet for an example to remove an existing polygon on my map in runtime and I ended up creating my own. Fortunately it is easy to delete objects in Leaflet JS using removeLayer method, it just that there are no available example available. So for those looking for the same function here it is.

Get the full sourcecode here

Thursday, June 27, 2013

Leaflet Js: Drag and Drop Polygons

The only draggable objects in Leaflet javascript are the marker and circle because you can use the setLatLng method to reposition the object. What if you need to drag and drop other shapes? without coding much you may change the marker's icon and use other images to replace the native balloon icon of a marker. But this is not what I needed on my project. I want my ship shaped polygons to move when I drag them on my map. I resolve this by using a 2 simple tricks.

1. Since marker is draggable, I added a marker to the center of the polygon I want to move.

2. Now when user drags the marker, I automatically redraw the polygon on the new location of the marker.

Complete source code after the jump.