Android Archive

How to get Accelerometer readings in Android

Author: | Categories: Android, Code Tricks, Quick Tips No comments
Hello all, Today we learn about getting Accelerometer readings in android application. We will use android SensorManager class to get readings from Accelerometer and show them on screen. First create a android project and create a file in layout folder as bleow in above file we are using three

How to change style of Horizontal ProgressBar in Android

Author: | Categories: Android, Code Tricks No comments
In this tutorial we will learn how to customize or change style of Horizontal Progressbar in Android. To change style of Horizontal ProgressBar we have to set a property android:progressDrawable with custom layer-list drawable in our layout file like:   and create progressDrawable like below in drawable folder (customprogressbar.xml)

How to apply custom font on TextView Android

Author: | Categories: Android, Code Tricks, Quick Tips No comments
Some times we need to apply custom font on a TextView in our application. We can do this by setting typeface to out TextView as below. In case you have more than two TextView in your application(also in different activities/fragments) which uses custom font, Then it would be better

Generally Asked Android Interview Questions for Freshers

Author: | Categories: Android, Quick Tips No comments
Hello Friends, Some times we need a quick reference to general Android interview questions when we are going for an interview but do not have much time for preparation. Here we have selected some generally asked Android interview questions for you, On which you can have a quick look

Sending email with attachment programmatically in Android

Author: | Categories: Android, Code Tricks, Quick Tips No comments
If you want to send email with attachment in android application programmatically you can use below method for it. Just modify parameters according to your use and you are ready to go.

Method to check internet connectivity in android

Author: | Categories: Android, Code Tricks, Quick Tips No comments
Some times we need to check internet connection status of device when we perform any network tasks using our application in android application development. Below is a simple method to check internet connectivity in android. And here is an example how to use it in your code.  

Handling Activity state using Saved Instance State Bundle

Author: | Categories: Android, Quick Tips No comments
In this tutorial we will learn about handling Activity state using Saved Instance State in Android or in other words we can say How to retain Activity state with the help of Saved Instance State Bundle in Android. Because some time we need our application to run on both

How to create multi select ListView Android with custom adapter

Author: | Categories: Android, Quick Tips 14 Comments
Here is a tutorial for how to create multi select ListView Android with custom adapter. In this tutorial we will learn some more things as below. 1. How to create multiple selection ListView. 2. How to create/use custom adapter for multiple selection ListView. 3. How to read contacts from

Basic Android Sqlite database example/tutorial

Author: | Categories: Android, Quick Tips No comments
There are many ways to store user/application data in android like saving data in Preferences, saving data in Files, saving data data in SQLite database, etc. Today we will learn how to create SQLite database in Android to save and use user data. for creating database in android we

How to create Flashlight application in android.

Author: | Categories: Android, Quick Tips No comments
How to create Flashlight application in android. In this tutorial we will learn how to use android built in camera led as flashlight/torchlight. by using camera object and by adding flash mode to camera object parameters using setFlashMode(Parameters.FLASH_MODE_TORCH) we can use camera flash as torch. (only device which has

How to Handle Back Button Event in Fragment andorid – ViewPager Android Tutorial.

Author: | Categories: Android, Quick Tips 3 Comments
Here we will learn how to handle back button in fragment class andorid. we will try to cover some more things also in this tutorial like 1. How to create and use a ViewPager in Android. 2. Handling Changes of Pages in ViewPager Android. 3. Working with Fragments Android.

How to show ProgressBar while loading a video in Android VideoView

Author: | Categories: Android, Quick Tips No comments
Tutorial for how to play video in Android VideoView and how to show ProgressBar while loading a video in VideoView. Android provides a widget VideoView to play video files. Here is the link for supported video formats for Android. http://developer.android.com/guide/appendix/media-formats.html#core In this tutorial we will learn how to play

Android WebView Tutorial

Author: | Categories: Android, Quick Tips 1 Comment
Basic tutorial for how to use android web view in android application. In this Android WebView Tutorial we will learn how to implement a basic WebView in Android application. We will also learn how to load a dynamic web page, How to load a local web page and how

Android ListView Tutorial

Author: | Categories: Android, Quick Tips No comments
In this Android ListView Tutorial we will learn how to use Android ListView to show array data as row wise scrollable view. The each row can be a View or a ViewGroup. The data is added to ListView using an Adapter. We will show names of cities in ListView,