android

Detect and use light and gyroscope sensors in Android

Karan Balkar
Hello everyone! Sensors play a vital role in any electronic device and more importantly help in detecting or measuring a physical property. Nowadays, Android phones come equipped with a range of sensors including light, pressure, temperature, gyroscope, proximity etc. Developers need to build applications using the functionality of these sensors. For that purpose, one needs to learn how to detect and implement the corresponding sensor functionality. Through this post, we will understand how to detect and use the Light and Gyroscope sensors in Android.

Handling Screen Orientation Android

Karan Balkar
It is observed that when device configurations including screen orientation, keyboard availability etc change, Android restarts the current Activity. This is done to enable the application to adapt to the new configuration. In order to declare an Activity that handles configuration changes we must add the android:configChanges attribute with a value that represents the configuration we want to handle, in our AndroidManifest.xml file. There are basically two ways to handle screen orientation in Android.

Processing for Android

Karan Balkar
Hello everyone! The Processing language has now become a popular development tool for Android applications. It's latest version 2.0+ allows developers to create an Android application from scratch using the newly added Android mode. Processing supports many libraries including video, network, PDF export etc. Just as Android, Processing is also open source and can be downloaded for free. Through this post, I will demonstrate how to create an Android application using Processing!

Display list of installed apps on Android Device

Karan Balkar
Hey everyone! Android provides the PackageInfo class that contains information about the contents of a package. Sometimes, we need to obtain the list of applications installed on an Android device in order to determine whether our application was installed correctly or not. In this post, I will demonstrate how to obtain the list of all installed applications on your Android device. Since I would be obtaining information about an application, I would also be using the ApplicationInfo class.

Implement Spell Checker Android

Karan Balkar
Hi everyone! Spell check is of the most common programs used to identify words in a document that may not be spelled correctly. Today, one need not carry a dictionary to self spell check. The age of mobile technology has given rise to a number of applications that incorporate the spell checking functionality. Android offers developers a spelling checker framework. In order to implement the spell checking feature, developers need to make use of the SpellCheckerSessionListener interface.

Using Proximity Sensor in Android

Karan Balkar
Hello everyone! The term proximity is basically the fact, condition or position of being near or close by in space. A proximity sensor is a device capable of detecting presence of nearby objects without any physical contact. Some of the Android phones in the market today come equipped with a proximity sensor. Through this post, we will learn how to use a proximity sensor in Android. As mentioned in the developer's guide, the Android platform provides a sensor that lets you determine how close the face of a device is to an object (known as the proximity sensor).

Using Jsoup on Android

Karan Balkar
Hello everyone! As Android developers, we often need to call web services in order to fetch data from a server. We also need to parse the data for displaying it on the user interface. There are various parsers available that enable developers to retrieve data efficiently from a web service. JSoup is one such open source library that provides an API for extracting and manipulating data. Basically, it is an HTML parser used for working with various HTML elements, attributes etc.

Display list of WiFi Networks in Android

Karan Balkar
Hello everyone! Android provides the WiFiManager class for managing all aspects of WiFi connectivity. It is used to to define the names of various Intent actions that are broadcast upon any sort of change in WiFi state. Through this post, we will learn how to display a list of available WiFi networks to which an Android device can be connected. The list can be viewed and updated, and attributes of individual entries can be modified.

Implement Content Provider in Android

Karan Balkar
Hey everyone! As developers, we often need to create applications that can share data with other applications residing on the Android device. A content provider is similar to a database where one can query it, edit its content, as well as add or delete content using insert, update, delete, and query methods. As mentioned on the developer's page, Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security.

Display circular ProgressBar in Android

Karan Balkar
Hello friends! In the past we have discussed about creating and displaying a basic ProgressBar in Android. A ProgressBar, as the name suggests is basically used to indicate the progress of an operation. By default the progress bar is a spinning wheel (an indeterminate indicator). However, one can also create a circular ProgressBar by applying certain custom attributes. More such styles can be found over here. In order to create a circular progress bar we need to add a new XML file in the drawable folder.