Behavior of WinJS.Promise.Join during Exceptions

Introduction

Promise is an object, which promises the user to get back the values or do some task after performing the promised activity without hampering the main UI. The execution of the other activities will work as normal. So in single word we can say, it is asynchronous.

The JOIN method of the Promise works like a waiter in the restaurant, waiting for the whole order from a table from each person. We can club separate promise objects and join them together. Join ensures to perform a task after all the promise objects finished their execution.

Queries encountered on the above

On all the above, I encountered the query,

  • what will happen when any of the Promise gets an error ?
  • Will it able to club the output and wait for the promises ? OR it will quite the execution ? Etc. etc.

After some of the homework and trials below are my findings. Continue reading

Rows drag and drop functionality in a table view using Alloy with Titanium

Introduction :

There might be a scenario where we need to re-arrange the rows with drag and drop effect. Using titanium, very easily we can achieve this.

Here I am describing the same with the video given below.

Summary :

Using above video I have described the way to implement drag and drop functionality on rows using Alloy with Titanium.

THAT’S IT

Presented ByRaju Mahato, Software Developer, Mindfire Solutions

Video tutorial to delete specific row from a table view in Alloy using Titanium

Introduction :

As we can dynamically add rows to a table view, we can also delete a specific row from a table view.

Titanium provides ‘deleteRow’ method using which we can delete any row.

With the help of below video, I am going to describe the way to delete row.

Summary :

So using the above code block we can add the functionality to delete any specific row from a table view.

THAT’S IT

Written ByRaju Mahato, Software Developer, Mindfire Solutions

Creating PhoneGap Android application using version 3.0.

Introduction: Previously PhoneGap was providing total package as a single version which contains all the necessary files for each platform. We are downloading the zip as a version and integrating the required files inside our Android application. It was working same till version 2.9 but from version 3.0 onwards the scenario is little different.

Description: From 3.0 onwards PhoneGap is not providing the zip file to download and integrate the same with our application. Now it is giving the install option, so we can directly install the PhoneGap into our system and use the same to create the application. Here we will focus on creating the Android application using version 3.0.

To install the PhoneGap we need some dependencies which will help PhoneGap to work properly. Continue reading

Hiding status bar while displaying splash screen in PhoneGap iOS application

Introduction: Most of the iOS application starts with the splash screen with the spinner which makes the sense that application is loading it’s required files and resources. But if you focus on the screen, you will find that while showing the splash screen, some part of the splash screen is hidden by the status bar.

Description: If we want to hide the status bar while showing the splash screen, it is very easy and we can view the splash screen completely by ignoring the staus bar above it.

Here is the the simple technique bellow.

1. Open Xcode and click on the project in Project Navigator.

2. In the target panel select the project and it will open the project details.

3. Choose the general tab form the list and we can find the Development Info panel in the list. And in Development Info there will be an option for Status Bar Style.

4. Then we need to tick the check box for “Hide during application launch”. Continue reading

Taking Photos Using PhoneGap Camera API

Introduction:
While working on a PhoneGap application , there was an requirement to take photo using device camera and upload in the sever. And PhoneGap provides an easy way to interact with the device camera and take photo using Camera API.

Description: Basically there are two ways to take photo from mobile device.

1. Taking photos using Camera
2. Taking photos from Library/Gallery

So here we will  focus on displaying the image in our application using both ways. PhoneGap provides the camera.getPicture method which can help us to invoke camera and take images from mobile devices.

Continue reading

Handling PhoneGap iOS Application Using Custom URL Scheme

Introduction:
Custom URL scheme is the mechanism through which third party applications can interact with each other. Suppose we want an interaction between our app and the default email application in the device. Apps that support custom URL schemes can use the schemes to communicate with other applications and also initiate specific tasks. For example, an app can open from default email app in IOS devices using custom URL.

Description:
To communicate with an app using a custom URL, we need to register the custom URL scheme in our appname-info.plist file. Apple by default supports for the http, mailto, tel, and SMS URL schemes. So if our URL scheme matches with the scheme mentioned by Apple then the Apple provided application will launch instead of our application. Therefore we need to be very careful before declaring the scheme.

Continue reading