Append Row in a Table View With Alloy Using Titanium

Introduction:

Titanium provides method associated table view which can be used to append row at the bottom of any table view. Here with the below video, I am going to describe you the way to append rows at the bottom of a table view.

Summary:
From the above video we have learned the way to append row at the bottom of any table view with Alloy using Titanium.

Written ByRaju Mahato, Software Developer, Mindfire Solutions

Invoking Camera Using WinJS

Introduction

Couple of days back, I got a task to capture image of an user. The image area is very limited in size. The user has to crop the image as per the required size and area to display. Before start worrying about the same, I was glad to see the features provided by WinJS.

We can use Windows.Media.Capture.CameraCaptureUI to invoke the camera and capture image. This not only shows the camera UI on screen but also displays the cropping options along with pixel adjustment and timer options.

Below is just a simple example of how it works.

HTML PART:-

<body>
    <input type="button" id="btnOpenCamera" value="Open Camera" />
    <br />
    <img src="#" id="imgCapture" alt="Caputured Image" style="display:none" />
</body>

We have added a button to open the camera and an image control to display the captured image on screen.

Continue reading

Callbacks the very essence of asynchronous JavaScript programming

Introduction

In earlier days of programming every thing was sequential when one operation needed to wait for the others above it to finish. In situation like those of some priority task had to be done then it had to wait for a long to execute the next. So Callbacks and asynchronous programming are the new market introductions.

Description

Callbacks can be in simpler term visualized as a reminder to the Event loop that this has to be executed after a specific interval. As a result after the interval is reached the callbacks get executed on the highest priority basis (But still there’s some limitation which you’ll get to know reading further).

These call backs can be of two types:

–  Blocking callbacks (also known as synchronous callbacks or just callbacks)
–  Deferred callbacks (also known as asynchronous callbacks)

Continue reading

Video Tutorial for Dynamically Inserting Multiple Progress Bar

In this tutorial we will demonstrate the way to insert the progress bar dynamically to the DOM using JavaScript.

Basic Template:-

<div class="progressBarHolder"
        data-progress="40"
        data-max-progress="100"
        data-show-extra="N">
</div>

Video Tutorial:-

Continue reading

Handling PhoneGap Android Application Using Custom URL Scheme

Introduction:-
When we are launching the Android application using custom URL scheme, we may need to extract the parameter attached with the custom URL that we are using as link in the other native application like email.

Description:-
In my last post I have described how to launch the android application using custom scheme. So continuing with that here we can get to know how to use the same URL scheme along with WebIntent Plugin to get the parameter attached with the custom URL.

After creating the intent in the manifest file in the next step we need to pass the  parameter via the href in the anchor tag. Lets say we are passing the user name as parameter in the href along with the custom scheme and we need the same user name after launching the application.

Continue reading

Video Tutorial for Designing Static Progress Bar

This tutorial we will demonstrate the way to design the basic progress bar. First, we will look into the design concept to be used, then will try to make the progress bar quite attractive.

Basic Layout:-

Designing Static Progress Bar

Designing Static Progress Bar

Video Tutorial:-

Desired Output:-

OutPut-Video Tutorial for Designing Static Progress Bar

OutPut-Video Tutorial for Designing Static Progress Bar

To achieve the above design below is the simple code,

Continue reading

Launching PhoneGap Android Application Using Custom URL Scheme

Introduction:-
Sometimes we need to open our Android application from other native application like email, map, default browser etc. It is quite possible using PhoneGap and also easy to implement. Here we can use custom URL scheme to fulfill our requirement.

Description:-
Suppose we need to open the Android PhoneGap application from other application like email. So we need to create an intent which will manage the custom schema and help to launch the application. We can create the intent in the AndroidManifest.xml file.
Below is the example to create the intent in manifest file.

Continue reading

Capturing And Storing Signature to Rhom In Rhomobile Application

Introduction:- 
Rhomobile has the ability to capture signature using the Signature API. Signature can be captured in two ways,
1. Full Screen Mode
2. Inline Mode
Note : From Rhodes 3.3.3 onwards, the inline mode has been moved on to RhoElement Vs 2 which is a paid version and requires a license to use it.

Description:- 
To use the Signature API, first, we need to add the camera capability in Build.yml,
capabilities:   Camera

Continue reading

Row Count with Titanium in CrossPlatform Application

Introduction:-
We generally use table view API in titanium to display data in row manner but there might be a scenario where we need to take care about the number of rows. So here I will be describing different ways to count number of rows and sections present in table view.

Description:-
Sometime we might get data from some external API or any other source that needs to be bind with a table where we are unaware about the number of rows that are present in the API response. So let’s create a situation for a table view where we will get the number of rows and section defined for those rows using Alloy with Titanium. Lets have a window where we will have a table view with some static rows.

So in order to do so lets, take a view called index.xml and its controller called index.js.

Continue reading

Searching on Table with Titanium on CrossPlatfrom App

Introduction
Generally we use table-view to display data in different rows with table format in an application and adding search functionality on those table data is very common. So let me demonstrate the ways to search data among the table rows.

Description
To display data in row format Titanium provides API called Table-View. So lets use table-view to display data on screen and then will add search functionality. Suppose we have a window called home where we will have our table.

Continue reading