Integrate SQLite plugin in PhoneGap iOS application

For offline storage in PhoneGap application, we can use local storage or storage API. But there are some limitations of this storage mechanism. So here we will discuss on creating local database with larger storage limits with the help of SQLite plugin.

To overcome the limitations, we can use the SQLite plugin which is very easy to integrate. Here are the steps below which will guide to integrate the SQLite plugin in PhoneGap iOS application.

1. Download the SQLite plugin from github by using this url.

2. The plugins are inside Cordova-SQLitePlugin / src / ios /. Let’s drag the SQLitePlugin.h and SQLitePlugin.m files into the Plugins directory in Xcode and choose the “Create folder references for any added folders” option while adding reference.
Continue reading

Few tips on JavaScript – Part II

This blog is a continuation of my last posting.

Solve the pass by reference problem in JavaScript
Many of us has come across the pass by reference problem in JavaScript array. we have simply assign one array to another array and any modification in one array reflects both the arrays and we bang our head where it is got changed.

var myArray=["test","nice","great"];
var changedArray=myArray;

Continue reading

Few tips on JavaScript – Part I

Properties in double quotes

var myArray=["test","xyz","great"];
console.log("MyArray Length (Without Quotes)="+myArray.length);
console.log("MyArray Length (With Quotes)="+myArray["length"]);

MyArray Length (Without Quotes)=3
MyArray Length (With Quotes)=3

As we know that we can access Array properties by array name with dot notation. But we also can access the array properties through the array square bracket within the quote. The array operator (square brackets) is also used for accessing the array’s properties (arrays are also objects in JavaScript) .So we can access the array length property within the quotes in the array square bracket. Continue reading

Data passing in multiple screens from one activity to another using Xamarin in Android

Introduction :-
In this Article, we will see how to create multiple screens in Android using Xamarin and pass data between them.
Android applications consist of a set of loosely coupled screens, represented by Activity classes.
Since each Activity is essentially decoupled from others, there needs to be a way to launch them and optionally pass data to them. On Android this is accomplished using Intents.

Intents are the classes that describe a message, both what the desired action of the message is and a data payload to send along with it. They are commonly used within applications to launch Activities. To launch a new Activity, we create a new Intent, set the Context and the Activity class to launch and then tell the OS to handle the Intent, which launches the Activity. Continue reading

Three Steps to Create Push Notification Enabled iOS Application

Apple push notification service. As an iOS Developer we often heard the term APNS. Let’s explore this cool feature of iOS device. APNS is Apple push notification services. By using this service we can send required information to the respective user’s application accordingly. This seems quit confusing so lets make it simple and clear.

As iOS application provide a very negligible scope to tackle things when the application is in background. Apple has provided a solution to this. In spite of, let your application track what new is available for user on the server side. you can write a script on your server to let your application what all updates it has. You can send three type of information using APNS:

Continue reading

Urban Airship integration to receive Push Notification in iOS using PhoneGap

Push Notification is a mechanism, which allows an application to notify the user about any new events without opening the application, same as a SMS pops up on our mobile screen. Push Notification can work both in background and foreground, so this is a nice way to interact with the application in the background.

Urban Airship provides easy and effective solution to push the notification to user. It can act as as a middle layer which will help us to send the notification from our server routing it through the Apple Notification Server.
So in this blog we will discuss the use of Urban Airship to send push notification to our application. Here are the steps bellow, which will guide us in the process of integrating the Urban Airship plugin in iOS application using PhoneGap version 2.6.0.

Step #1:
Download the plugin for Urban Airship from github with this URL.
Continue reading

MVVM Command Binding in Windows Phone using Custom Delegates

Binding commands in MVVM is a bit tricky, but if understood correctly then of a great use.
A simple command can be bound using a Delegate and the Icommand Interface to handle the function that is to be executed.

First of all we need to know what a Delegate is?
A Delegate is a reference to a function. A Delegate is much useful in an event execution. Although this example deals with a custom Delegate we can use a predefined delegates present in the System Namespace.

Secondly and most importantly, ICommand interface and its implementation. ICommand can be found in System.Windows.Input namespace. ICommand interface provides all the method signatures that are used to execute a command in MVVM. Continue reading

Integrating iAd in a PhoneGap Project

As the name suggests iAd is a mobile advertising platform provided by Apple to embed advertisements into the app. The new feature of iAd makes the content of the app more lively and dynamic, since clicking on an advertisement unlike the previous one it does not navigate away to Safari but opens a new Pop-up Window for the Ad inside the app.

To integrate an Ad using the iAd framework we need to mainly modify the MainViewController.h and MainViewController.m files by adding some additional code to it.

Below is the integration guide as follows.

We need to open project navigator, then click on the Build Phases tab.

Here we will find the row Link Binary With Libraries. We need to add iAd.framework to the project by clicking on the Add(+) button( at lower left end). Continue reading

Custom commands in Windows store Message Dialogs

Message Dialogs are important part of windows store app and they help us providing popup messages and quick information in required places. Typically a message dialog covers the entire screen and by default has a close button. Windows store apps allow us to change these default characteristics of a message dialog.

The default close button in message dialog for windows store app can be removed and new buttons with custom click event handlers can be added to it. These events can be then later used to catch user interactions with the information. Continue reading