It was quite late in the evening and I was about to wrap up my work. Suddenly I got a call form my client in Skype and he shared his concerns of uploading the build to production. Although it was late, I thought to help him before I close the day, since that guy is in the middle of his day time (in US). Now mind set is to spend time on the issue. I started looking into the issue.
The issue is, while he (my client) started uploading the APK file into the Android store, he is receiving the below rejection message from the store.
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 →
Xamarin provides a number of ways to save data in iOS using Local Storage. User preferences are generally stored in Library/Preferences/.
Xamarin iOs provides its built in mechanism i.e. instead of creating files directly in the directory it is suggested to use NSUserDefaults class to save data.
Description: NSUserDefaults class provides its own built in mechanisms to save float, double, integers, Boolean and URL data. To save a custom object it should be converted to NSData object using NSUserDefaults. Continue reading →
Alert dialog is a important part of any application. Conveying various information, error messages and even for taking confirmations from user can be done through alert dialog. Xamarin provides it’s own way of showing alert and conveying messages to the user.
Alerts in Xamarin are, an object of AlertDialog.Builder class, where AlertDialog is a subclass of Dialog class. Builder() is a method of AlertDialog class, which creates an alert dialog to display. We can add multiple buttons to this alert dialog. The builder takes the current context (Activity) and shows the Alert Box in the main thread(The UI thread). Continue reading →
Xamarin provides different layout for designing the user interface in Android.
Some common ones being used are Relative Layout, Linear Layout, Grid Layout, Table Layout, Frame Layout etc. Most of them are understandable from their name itself. Here we will discuss about how to design using Relative Layout in Xamarin for Android.
As the name suggests, Relative Layout mainly makes use of the controls present in the Designer and places controls relatively to each other. The most important aspect of this design being the First element placed inside the tag. The places itself depending on the properties set for the children in the Relative Layout.
For example: Continue reading →
I received a bug ticket from my client about the unusual behavior of my application UI. It was a problem which was occurring only in iOS7 only.
When the keyboard pops up in iPad devices running on iOS7 the web view of our app gets shrink (app development using Phonegap).
Solution that works for me : This problem can be solved in few steps.
We need to go to Config.xml and inside the preference tag just need to set the value of KeyboardShrinksView to false.
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.
To control the synchronous or asynchronous flow, there may be more methods but we will do this by multiple callback mechanism using deferred and promise object.
In order to use this mechanism first we need to have an understanding of deferred and promise object.
Here we will use a promise with a deferred object.
A promise is a placeholder for a result, which is initially unknown. While a deferred represents the computation that results in the value. Every deferred has a promise, which functions as a proxy for the future result.
A promise is a value returned by an asynchronous function, but a deferred can be resolved or rejected by its caller which separates the promise from the resolver. Continue reading →
LibGdx a cross-platform game development framework and a best way for beginners who turned into game development. Using LibGdx one can build 2D or 3D games with little efforts only you need to be familiar with the basic programming language. There is a core project that needs to create on java and some little coding needs to make it executable in different platforms like desktop, Android,IOS Html5 etc. We will focus on to develop android games. I am going to start with the very basics step that needs to be setup before the coding part. And then we build some Demo Projects and try to get understand that how the whole code is working. To work on LibGdx you need to install Java JDK, Android SDK and Ecllipse. There is a TroubleFire section in the blog where you will find solutions of the troubles that might come during your work.
Download the Java Standard Edition JDK for windows platform after downloading execute the downloaded installer file (for example, jdk-7u11-windows-x64.exe) and follow the instructions on the screen. Setup the Environment variable path with your jdk path
Start->Right Click on Computers->properties->Advanced System Setting → Environment Variable
look out to system variable click on Path click to edit add your JDK directory path (like C:\Java\jdk1.7.0_11)
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 →