Android Studio for Android App Development

In Google I/O 2013, Google revealed an IDE - Android Studio - especially designed for Android Application Development. That time, it was used by few developers for creating demo applications - nobody wants to share their application which was created using a beta version IDE, there was a possibility for getting stuck in mid of development because of problem(s) created by a beta release IDE. (more…)
Read More

Store Data – SharedPreferences – Android

When it comes to store data like username for a user specific application, or checking how many times the application is opened. It is not a good choice to manage a database. As mentioned in previous blog posts, Android SQLite Database - Part 1, and Android SQLite Database - Part 2, it will be time consuming. In conjunction to that, it is not going to fulfil why database is for and database transactions are costly for such one time transaction. So, it is good if you choose to save data, like in above example, in SharedPreferences. (more…)
Read More

Copy to Clipboard Programmatically – Android

Clipboard is a type of register where copied contents are kept by Android. If you require to keep some text content which could be used for later use, you can have it in Clipboard. But, don't rely on clipboard for storing it permanently. For temporary use it is a nice place to have content. (more…)
Read More

Change text of Google Plus SignInButton – Android

In an application which allows users to sign up and then use it, have a form containing a list of information to be filled by user. For this purpose its easy to integrate some social networking website and get user signed up with just one or two clicks. Google provides a very easy option to Login using Google and use that information to sign up users. Implementation of the same requires some adjustment(s) as per UI and look-and-feel of the application. In order to change the text of Google Plus SignInButton use following method (more…)
Read More

ListView using BaseAdapter – Android

The previous post, Create List Using ListView was about displaying an array of a list. It dealt with only one element in a list item. In order to display a List with multiple views in a list item, BaseAdapter could be used. A ListView using BaseAdapter could display a List with multiple views in it. In this tutorial, we are going to create ListView using BaseAdapter. So, this tutorial covers following points. - Create custom BaseAdapter, and - Inflating a custom view as the list item. (more…)
Read More

JSON Parsing – Android

The last post XML Parsing using SAXParser was about parsing a web service providing XML. In this post we are going to parse JSON available at http://www.pcsalt.com/postservice/?format=json. The JSON available at the link may seem messy, for the formatted view of JSON JSONLint. In order to parse JSON, at first we should examine the JSON and determine what is it we need to parse. (more…)
Read More

XML Parsing using SAXParser – Android

Webservices are one of the effective way of transferring information from server to mobile apps. The webservices may use XML or JSON formats for the purpose. This tutorial is about parsing information available at http://www.pcsalt.com/postservice/?format=xml. And, the end result will be an Android app having a list of posts on Android, and clicking on the list item will open the linked page. Following XML is an abstract from above URL. First we determine what tags are there in XML and then we would parse to extract and display this information. (more…)
Read More

Android SQLite Database – Part 1/2

When it comes to save data in an Android device then there are three ways to do it. Depending on the nature of requirement data could be saved in- SQLite Database - A light weight database already available with Android. Shared Preferences - An XML file used privately by the application which created it, and File - Writing a file and saving it on SD card. (more…)
Read More

Override Button of AlertDialog – Android

As per the requirement of applications, sometimes we need to provide a custom feature to the buttons of AlertDialog. For instance, we may need to change the color of Positive, Negative, and/or Neutral buttons. And for the same reason, we may need to override button of AlertDialog to provide custom behavior. In this tutorial, we are going to override the buttons of AlertDialog. So, this tutorial covers following points. - Create AlertDialog - Override the Buttons of AlertDialog - Change text color of AlertDialog buttons (more…)
Read More