Few days ago I received a comment from one of the reader of my blog to show an example on CRUD (Create, Read, Update and Delete) with the database. So in this post we will explore the use of CRUD operation using SQLite database in PhoneGap application.
CRUD can be described as a process, which helps the user to add, view, search and modify the information inside the database.
Here are the basic steps which demonstrates CRUD operation.
Create or add new entries
Read, retrieve, search or view existing entries
Update, modify or edit existing entries
Delete, deactivate or destroy existing entries
Before doing any operation on database let’s initialize the database first, either using HTML5 local database concept or using SQLite plugin. Continue reading →
While developing a PhoneGap application, I got a new requirement to add an event to native calendar from the application. So that user can get aware of the details of the event from native calendar.
To implement the same, I goggled for while and found a nice and interesting plugin which is very easy to integrate and works with PhoneGap smoothly. It allows the user to add the event to calendar of that device. Here are the steps bellow which will guide to integrate the calendar plugin in PhoneGap iOS application.
Introduction: Usually PhoneGap supports SQLite database to interact locally. There might be a scenario where we need to create the database freshly or sometimes need to use the existing database. The idea of writing this blog came to my mind while encountered a question in stackoverflow site. In this blog we will focus on importing existing database into our PhoneGap application and use the same to interact with our application.
Description: Lets have a pre-populated database having tables with data which needs to be imported to our application. It will help us to minimize our effort in creating the database freshly to the application on its startup. For this we need to follow the bellow steps.
Step 1 : Remove the .sqlite extension from the sqlite database. Ex. If we have the database called DummyDB.sqlite make it only DummyDB. Continue reading →
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 →
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.
Download the plugin for Urban Airship from github with this URL.
Yesterday I received an email from her, which includes a query, “how can we include the different formats of same video file to play it in different browsers”.
We all know that all browsers do not support same media formats of videos. So it’s a best practice to include different formats of videos to play it in different kind of browsers and devices. The browser will detect the supported format automatically and play that video file.
As per that post, videos were declared in an array to play them in a loop using HTML5. var videoSource = new Array();
So now the question is, how can we include the other formats for the same video? If we declare the array like below, will it work? Continue reading →
Speech to text conversion is the mechanism to translate the spoken words into text. It is also known as automatic speech recognition. Whereas Android provides the native functionality to recognize the speech and convert the same to text. We just need to invoke the native module to fulfill our task.
While working with voice to text conversion in Android using PhoneGap I came across SpeechRecognizer plugin.It is very easy to integrate in PhoneGap application and also helps us to recognize the speech and convert the same to text in json array. So bellow are the steps to integrate this plugin with Android using PhoneGap. Continue reading →
In this post we will discover the use of Google API to get the latitude and longitude by passing the address/location in PhoneGap application.
It is very easy to get the geographic coordinates (latitude & longitude) from a particular address using Google API. Google API exposes Geocoder() method which takes the address as input parameter and returns the geometry.location as output. We can parse the geometry.location to get the latitude and longitude value.
Here is the code snippets to get the latitude and longitude value from specific address. Continue reading →
In this post we will discover the use of Google API to get the current address and type of address by using the PhoneGap geolocation API and Google API.
Sometimes we need to get the address of a location from geolocation value. It is very very easy to get the same using Google API and PhoneGap. First we need to get the geolocation value i.e latitude and longitude using PhoneGap geolocation API.
Here are the steps that we need to follow.