Integrate SQLite plugin in PhoneGap iOS application

Introduction:
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.

Description:
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.

https://github.com/lite4cordova/Cordova-SQLitePlugin

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

Advertisements

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;
changedArray[1]="chnagedValue";
console.log(myArray);
console.log(changedArray);

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"]);

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

Description
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

Introduction:
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.

Description:
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.

https://github.com/urbanairship/phonegap-ua-push/tree/1.0.8
Continue reading