Android Tutorials

Android Tutorials

In this detailed Resource page, we feature an abundance of Android Tutorials!

Android is a mobile operating system developed by Google. It is based on a modified version of the Linux kernel and other open source software, and is designed primarily for touchscreen mobile devices such as smartphones and tablets. In addition, Google has further developed Android TV for televisions, Android Auto for cars, and Wear OS for wrist watches, each with a specialized user interface. Variants of Android are also used on game consoles, digital cameras, PCs and other electronics.

The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android, using Java. So, if you know Java, Android programming should be easy!

This page contains tutorials concerning all aspects of the Java programming language ecosystem for application and game development on the Android platform.

Note
If you wish to build up your Android knowledge first, check out our Android UI Design Basics Tutorial

Android Tutorials – Quick Start

Getting started with Android programming

  • Android Tutorial For Beginners With Examples
    There are lots of reasons why more and more people are interested in learing how to be able to develop Android applications. Unarguably, Android is the most popular mobile operating system, with almost 2 billion devices activated and it offers a unified approach to application development for mobile devices.
  • Android Settings Example
    During the development of mobile applications, a common requirement is of storing app related data to the phone. In Android we perform this task with the help of Preference APIs. We may also need settings that allow users to modify preferences in app.
  • Android Interview Questions and Answers
    Our Android interview questions and answers collection is all about different types of questions that can be used in an interview, in order for the employer to test your skills and knowledge.
  • Android UI: Themes and Styles
    In this article we will describe how we can use style and theme. This is an important aspect when developing an app because using style and theme we can brand our app and have an harmonious look.
  • Android Application Class Example
    We all know there is an Application class in the Android API, that is usually used for maintaining global application state but how does it work? In this article, let’s explore it with the help of examples and discuss its advantages & disadvantages.
  • Install Android OS on your PC with VirtualBox
    Google’s Android is an operating system and software stack for mobile devices. Under the hood, it uses a customized version of the Linux kernel. Android is currently the fastest growing mobile operating system and is generating quite the buzz.
  • Android: Debugging on a real device
    In this tutorial we are going to see how to debug and run your Android application in a read device. This is a very popular subject among Android developers. Emulators are a very important component when developing Android apps.
  • Android Studio: Getting started with the new Android IDE
    In this example we are going to see how to install Android Studio, as well as creating and Launching a new Android Project with it.
  • Android UI: Full Sample App
    As an example, we will build a To Do app: this is a simple app where we can add todo items and manage them. We will cover how to create the UI layout structure, how to add widgets so that we can show text messages to the user and how to accept user input.
  • Android Web App Example
    Nowadays, mobile applications are trending so much that, most of the websites have their Android application. Android made it so simple that one can convert their websites to application or can open web page in their application by using WebView. This tutorial walks you through the concept usage ant its implementation.
  • Java vs Kotlin for Android Development
    Mobile technology is one of the most disruptive innovations in the world today. Google’s Android and Apple’s iOS, are the operating systems used primarily in mobile technology, such as smart-phones and tablets. For almost two decades, Java was the prime language to build Android applications.
  • Android Project migration from Eclipse to Android Studio
    This example describes the differences between Eclipse ADT and Android Studio, including project structure, build system, and application packaging, and will help you migrate your Android Eclipse project to Android Studio as your new development environment.
  • Android Logging Example
    Being an Android developer, all of you might have heard of logging. Well if not, this tutorial will guide you with the concept usages and its implementation. Let us start with the quick introduction of the concept about what it is and why it is used.

Android Tutorials – Fundamentals

Check the basic Android programming tutorials

  • Android UI Overview
    Android is a widely used OS made for smart phones and tablets. It is an open source project led by Google and it is released under Apache License. This permissive license helped this OS to be widely adopted and allows the manufacturers to freely modify and customize it.
  • Android Contacts Example
    In this example we are going to see how to get Contact Information on your own Android Application. This is an example that demonstrates the appropriate queries (basically there are translated to SQLite queries) you should use in order to get the information you want about Contacts.
  • Build Android application package file (APK) using Eclipse IDE
    In this example we’ll see how to create .apk file ready to be installed in Android device. For this tutorial, we will use the following tools in a Windows 64-bit platform: JDK 1.7, Eclipse 4.2 Juno and Android SKD 4.2
  • Android ActionBar Example
    In this tutorial we are going to see how to create a simple Android Menu using ActionBar. It is a very handy kit when you want to create simple Menus for your application.
  • Android Intent Example
    In this example we are going to see how to use the Android Intent component. You can think of Intents as messages that the Android Platform sends when it wants to request the service of another resource, like launching another Activity or another Service.
  • Android Socket Example
    n this tutorial we are going to see how to use Sockets in Android Applications. In Android, sockets work exactly as they do in Java SE. In this example we are going to see how to run an Server and a Client android Application in two different emulators.
  • Android SQLite Example
    In this example we are going to see how yo interact with an SQLite database with your Android Application. SQLite is an Open Source Database for structued data in relational databases.
  • Android SharedPreferences Example
    In this example we are going to see how to use Android SharedPreferences. You can permanently store preferences using SharedPreferences with the form of a pair : key and a value.
  • Android Thread Example
    In this example we are going to see how to use Android Thread. As we read from the official documentation: A Thread is a concurrent unit of execution. It has its own call stack for methods being invoked, their arguments and local variables.
  • Android Handler Example
    In this example we are going to see how to use Android Handler. As we read from the official documentation: a Handler allows you to send and process Message and Runnable objects associated with a thread’s MessageQueue.
  • Android OnClickListener Example
    In this post, we feature a comprehensive Android OnClickListener Example. We are going to see how to work with OnClickListener in an Android Application.
  • Android Asynctask Example
    In this tutorial we are going to see how to use Android AsyncTask. As we read from the Android Documentation: AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations.
  • Android Timer Example
    In this example we are going to create a simple Android Timer application. We are going to use some very basic ideas and tools, like Handler, that you can use in many cases in your Applications.
  • Android : How to check if device has camera
    In this tutorial we are going to use PackageManager and the hasSystemFeature method to find out whether our device has a Camera or not. Of course there are plenty of things you can find out about the device using the same tools.
  • Android: How to make a phone call
    A very useful feature in Android is that you can use the built in Android Application to make phone calls from inside the Application. You can also use the TelephonyManager and a PhoneStateListener in order to monitor the phone state.
  • Android: How to set default activity
    In Android you might create many Activities for your Application and you want to choose which one of these will be launched when the Application starts up. In other words which Activity will have the role of the main Activity of your Application.
  • Android: How to send Email
    In Android you can use the built in Email client Application in order to send Emails from inside your own Application. You can do that by calling the built in Application using an Intent.
  • Android: How to send SMS message
    A very useful feature in Android is the SmsManager API which you can use to send an SMS from inside your own Application. Actually there are two way you can send an SMS from your Application: Using SmsManager API, Using the build in SMS activity of Android API
  • HTTP Camera live preview example
    With this example we are going to demonstrate how to create Live Camera preview in Android. The Android SDK includes a Camera class that is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video.
  • Android Reverse Geocoding with Yahoo API – PlaceFinder
    We are going to provide information regarding the user’s position. For example, we are going to find the street address nearest to a specific point.
  • Android Text-To-Speech Application
    One of the many features that Android provides out of the box is the one of “speech synthesis”. This is also known as “Text-To-Speech” (TTS) and is mainly the capability of the device to “speak” text of different languages.
  • Android Http Get and Post Example with OkHttp
    In this example, we are going to learn how to execute simple Http Get and Post requests from our Android Application. We are going to make use of the OkHTTP 3.0 library, where OkHTTP is an Open Source project designed to be an efficient HTTP client.
  • Android Full App, Part 1: Main Activity UI
    We are going to setup our Eclipse project, prepare the user interface for the main activity and finally test it on an appropriate emulated Android Device.
  • Android Full App, Part 2: Using the HTTP API
    In this part we are going to see how to consume an external HTTP API and how to integrate the API’s searching capabilities into our application.
  • Android Full App, Part 3: Parsing the XML response
    In this part we are going to see how to parse the XML response using Android’s built-in XML parsing capabilities.
  • Android Full App, Part 4: Performing the API request asynchronously from the main activity
    We will tie together the HTTP retriever and XML parser services in order to perform the API search request from our application’s main activity.
  • Android Full App, Part 5: Launching new activities with intents
    We will see how to launch a new Activity and how to transfer data from one Activity to another.
  • Android Full App, Part 6: Customized list view for data presentation
    We are going to create a custom list view in order to provide a better data visual presentation. The view used to present the search results in our tutorial is quite rudimentary and plain.
  • Android Full App, Part 7: Using options menus and customized dialogs for user interaction
    We are going to create options menus and custom dialogs in order to facilitate better user interaction. When developing applications for mobile devices which are rather limited in terms of resources (either CPU, memory or screen size), we should strive to make the most out of the available screen real-estate.
  • Android Full App, Part 8: Creating an AppWidget for the home screen
    For our application, we are going to create a widget which periodically provides updates on the latest movie created in the TMDb database. As I have mentioned in the past, we have been using the very cool TMDb API for movie/actors search and various other related functions.
  • Boost your Android XML parsing with XML Pull
    In today’s technology world, XML parsing capabilities are a necessity for a big number of applications whether they are mobile, enterprise or in the cloud. Despite the fact that XML is bloated and very verbose, it still remains king in the field of data exchange (JSON is a nice alternative, check our tutorial for JSON integration with GWT).
  • Android Proximity Alerts Tutorial
    Smart-phones are taking over the mobile world, this is a fact. Since GPS devices are usually found embedded in those phones, there is already a notable rise in applications that take advantage of the offered geographical positioning functionality.
  • Android Quick Preferences Tutorial
    When developing a mobile application, a common need that arises is the one of storing user’s preferences and using them when the application starts. Since this is a recurring need, Google has created a preferences framework for us.
  • Android JSON Parsing with Gson Tutorial
    Apart from XML, JSON is a very common format used in API responses. Its simplicity has helped to gain quite the adoption in favor of the more verbose XML. Additionally, JSON can easily be combined with REST producing clear and easy to use APIs. Android includes support for JSON in its SDK as someone can find in the JSON package summary.
  • Android XML Binding with Simple Framework Tutorial
    XML is still important in the area of web services even though REST has gained significant attention lately. Exposed APIs via web services is the main reason I have to manipulate XML content in my Android applications. For that reason I need to parse XML documents even though it is a tedious procedure.
  • Android Google Maps Tutorial
    The Android platform provides easy and tight integration between Android applications and Google Maps. The well established Google Maps API is used under the hood in order to bring the power of Google Maps to your Android applications.
  • Android Google Maps v2 Tutorial
    The great power of mobile applications software, is that it gives us the opportunity to develop many ideas that use hardware features, in order to complete simple everyday tasks.
  • Android HTTP Camera Live Preview Tutorial
    The Android SDK includes a Camera class that is used to set image capture settings, start/stop preview, snap pictures, and retrieve frames for encoding for video. It is a handy abstraction of the real hardware device.
  • Publish Android Application Example
    After the implementation of an Android application, the last step is to publish your app in order to be available to the users. You can sell your app or release it for free via an Android application marketplace (like Google Play), via your website or even by distribute it directly to the users.
  • Android ListActivity Example
    ListActivity is a subclass of Activity that includes a ListView object. Through ListActivity class you can create an activity in your Android application that can be connected to different data sources (query cursor or arrays) and can be displayed as a set of list items on the screen.
  • Android Notifications Example
    In this tutorial, we will create two different Notifications, the first one with normal view and the second one with big view, using explicit and implicit Intents respectively.
  • Android Location Based Services Example
    Android System gives the opportunity to determine the current geographical location and to build location-aware applications, without focusing on the details of the underlying location technology.
  • Android Event Handling Example
    Events represents a response to user’s interaction with input controls, such as press of a button or touch of the screen. Android framework places each occurring Event into a queue, which is based on FIFO (first-in first-out) logic.
  • Android Cursor Example
    In Android programming, storing data into a database is not a common practice, as we have other and most suitable methods to store our data, such as the SharedPreferences way.
  • Android Database Example
    In Android programming, storing data into a database is not a common practice, as we have other and most suitable methods to store our data, such as the SharedPreferences way.
  • Android Volley Example
    The Android Volley library is an Android library which enables developers building application which will make requests to some sort of API Server more manageable and fast in terms of overall application performance.

Android Tutorials – User Interface Controls

Simple examples to learn Android UI control techniques

  • Android ImageButton Selector Example
    In this tutorial we are going to use two different images that will reflect the status of one button. When the button is released, the green Android logo will be the background image of the button. When the button is pressed, the green Android logo will be the background image of the button.
  • Android ImageButton Example
    In this tutorial when the user clicks on the ImageButton, a ClickListener will be called (just like it would with a normal Button…) and display a short message on the screen.
  • Android Snackbar Example
    In this example, we will be implementing a basic Android SnackBar Activity, which will be able to display a long waiting SnackBar, a short waiting SnackBar, and an interactive SnackBar. To Trigger these different functionalities we will create 3 separate buttons for each one of the SnackBar scenarios.
  • Android Toast Example
    In general a Toast message is quick way to debug you’re application, for example to check whether a button is working properly or not. In this tutorial we will show how to display a regular Toast message. Additionally we will create and display our own customized Toast message.
  • Android Toast vs Snackbar Example
    In Android, one can use the Android Toast or the Android Snackbar to display feedback or action messages to users of an application. The Android Toast is mainly for Platform oriented messages although the Android Snackbar could be also be used for these requirements.
  • Android Custom Dialog Example
    In this tutorial we are going to create a Dialog that will display a custom image and a text message. As we know there is no such thing by default. That means we have to make it ourselves.
  • Android Prompt User Input Dialog Example
    In Android you can use the AlertDialog component, and you can customize it to your own User Interface so it can have any use you want. In this tutorial we are going to create an AlertDialog that can accept text input for the user. As we know there is no such thing by default. That means we have to make it ourselves.
  • Android Alert Dialog Example
    The Alert Dialog is a very common component in all User Interfaces, when you want to inform the User about a serious decisions concerning some aspects or the flow of the Application. In this tutorial, we will learn how to display a simple Alert Dialog, where the User will decide whether to to close the Application or not.
  • Android Progress Bar Example
    The progress Bar is a very common component in all User Interfaces, when you want to display the progress of a task that is taking up a lot of time, for example a file download.
  • Android Analogclock And Digitalclock Example
    In Android you can use android.widget.AnalogClock component to display a two-handed Analog Clock and android.widget.DigitalClock to display a Digital clock in your Application.
  • Android Time Picker Example
    Android it’s very easy to set the time using the android.widget.TimePicker component. In this tutorial we are going to see how the user can select the hour, and the minute using the android.app.TimePickerDialog which is an easy to use dialog box.
  • Android Date Picker Example
    Android it’s very easy to set the date using the android.widget.DatePicker component. In this tutorial we are going to see how the user can change the day, the month and the year using the android.app.DatePickerDialog which is an easy to use dialog box.
  • Android Spinner (Drop Down List) Example
    In this tutorial we are going to see how to set up and display a Spinner. There are two ways you can populate the Drop Down List with options. The first way is by creating a hard coded string-array resource in xml form.
  • Android Rating Bar Example
    In this tutorial we are going to see how to set up and display a Rating Bar with Stars. When the user slides over the bar, the rating goes up or down by one Star and the selected/deselected Stars change color automatically as does the value of the rating.
  • Android ToggleButton Example
    Sometimes you may want the user to select whether he wants a specific action or operation of your Android Application to be switched on or off. In Android, this is very easy using the ToggleButton component. A ToggleButton has simply two states : ON or OFF.
  • Android Radio Buttons Example
    One of the easiest and most common ways to accept user input in an Android Application is the Radio Button component. Usually, we want radio buttons to be in groups, representing a set of options. In a group, when a radio button is selected all the other options in this group are automatically deselected.
  • Android Checkbox Example
    In this tutorial we are going to see how to set up and display a checkbox list with some options for the user. Furthermore, we are going to use a button that when it’s pressed, a message will be displayed reflecting the status of the checkboxes and that is checked or unchecked.
  • Android Password Field Example
    In this tutorial we will see how you can use a normal EditText component in order to take a password as an input. Additionally we’ll see how to create a custom Label with some text in it, as well as a simple Button.
  • Android Textbox Example
    In Android you can use the EditText class in order to create a textbox on your screen in which the user will write text. Then, we have to bundle this textbox with a specific key event, so when the user presses the key the application can get the text written in the textbox as an input and perform a specific action.
  • Android Button Example
    One of the most basic elements in any Graphical User Interface is the button. So in this post we’ll talk about creating a button and adding it to our application. Furthermore, we’ll show how to bundle a specific button with an action, which will occur every time the user presses the button.
  • Modal dialog (popup) from Android widget example
    In this example we are going to see how you can create an Android widget in the home screen that can open a pop up dialogue box. As you know, Android Widgets are small applications that can basically do two things. Launch a new Activity when pressed, or display information that get updated at a decided time interval.
  • Android Styles and Themes Example
    Android gives us the opportunity to specify the format and the design of View components or screens of our app, by declaring some characteristics such as color, margin, text size etc. This is happening via a Style, which is a XML resource and it is separate from XML layouts.
  • Android Custom Components Example
    Although Android provides us many built-in components, such as Button, TextView etc, it also offers us the opportunity to create our own custom widgets in order to adjust them to our needs and our requirements.
  • Android EditText Example
    Android system supports EditText, which is a subclass of TextView supplied with text editing operations. We often use EditText in our Android applications in order to provide an input or text field, especially in forms.
  • Android SeekBar Example
    In Android, a SeekBar is a ProgressBar element’s extension that allows the selection of integer values using a natural user interface. SeekBar has a thumb that can be slided in order to choose a value between 0 and some maximum that can be set from the developer.
  • Android SlidingDrawer Example
    SlidingDrawer represents a widget, where we can use in our Android applications. SlidingDrawer has the ability to hide and/or appear content when the user drags a handle. More specifically, it includes two basic views.
  • Android Fragment Tabs Example
    We ‘ll create three (3) tabs (they correspond to my most-driven cars), which will contain fragments; Android Fragments must be setup using Listeners – you ‘ll see what I mean while moving on.
  • Android RadioGroup Example
    RadioGroup is a widget in Android which groups RadioButtons. More specifically, the use of RadioGroup provides the capability of selecting only one RadioButton from the set.
  • Android Canvas Example
    Android provides a set of APIs for 2D-drawing that allow you to render your custom graphics on a canvas or modify the existing Views. When drawing 2D graphics, you have two choices to work with Draw your graphics or animations into a View object from your layout.
  • Android Fragments Example
    A Fragment represents a portion of a user interface or an operation that runs within an Activity. A single activity can contain multiple fragments and many fragments can be reused in many, different activities.
  • Android Drag and Drop Example
    The Android System provides Drag and Drop framework, which facilitates users especially to move data from one View to another within the current layout. It is good to mention that many apps take advantage of the graphical drag and drop gesture that the system procures.
  • Android Alert Dialog Example
    In this post, we feature a comprehensive Android Alert Dialog Example. Sometimes in our applications we want to alert the user for an event and/or ask him/her about taking a decision. For this purpose AlertDialog class can be used, where a message and one, two or three buttons are displayed in a popup window.
  • Android Physical Keys Example
    Every Android device is provided with physical keys. In the wide variety of Android mobile devices, we may meet devices with three or four physical or virtual keys.
  • Android FloatingActionButton Example
    The Floating Action Button is a special type of button primarily used for functionalities such as morphing, launching, and the transferring anchor point. Further, this type of button is often found on the floating surface of a user interface.
  • Android Navigation Drawer Example
    It is hidden most of the time, but is revealed when the user swipes a finger from the left edge of the screen or, while at the top level of the app, the user touches the app icon in the action bar. In this example, we are going to see, how to how to implement a navigation drawer using the DrawerLayout.

Android Tutorials – Views

Basic building block for user interface components

  • Android UI: Understanding Views
    The Android UI framework provides some basic UI components, that are called controls or widgets, helping developers while coding and building an app.
  • Android ProgressDialog Example
    In this tutorial will create a ProgressDialog to let the user know the progress and a status of a simulated Image download activity. We will demonstrate both the Ring and the Bar style of the ProgressDialog component, as well as the use of special tools like Handler to update the value ( progress…) of the bar format.
  • Android ExpandableListview Example
    With this tutorial we are going to see how to use Android ExpandableListView. As you might have imagined, ExpandableListView is quite like a ListView but it has 2 levels, one can say. It’s sort of like a menu with sub menus.
  • Android HorizontalScrollView Example
    In this example we are going to see how to use HorizontalScrollView in an Android Application. The HorizontalScrollView is like a ScrollView but with horizontal orientation. It is very useful because it is not very usefull to scoll up and down the whole screen of you application.
  • Android Scrollview Example
    n this example we are going to see how to use Android ScrollView component. This is a layout container that can host multiple component and views and can is scrollable.
  • Android MultiTouch ListView Example
    In this example we are going to see how to create MutliTouch ListView in an Android Application. In this example, every Item in the list is clickable, so you can bundle it with a ClickListener, and it contains two buttons to edit and delete items.
  • Android WebView Example
    In Android, you can use the WebView component in order to present markup pages from URL or custom html markup page (short of like a browser, but in your own application…). In this tutorial we are going to create an use two Activities.
  • Android GridView Example
    One of the most usefull layouts in Android is the GridView. GridView organizes the items of your screen in a two-dimensional array (a grid…). In this tutorial you are going to see two examples of GridView. In the first part we see the normal use of GridView.
  • Android ListView Example
    In this tutorial we are going to see how ListView and ListActivity works. This tutorial has two parts. In the first part you are going to see the normal way to display a ListView. In the second part we are going to create an customized ListView and for that we need a customized ArrayAdapter.
  • Android ImageView Example
    In Android you can use the ImageView component to display images in your Application. Although it is quite easy to use ImageView, there are many different configuration options and many screens from different devices that you should take into account.
  • Android Auto Complete Example
    Sometimes we want from our application, to provide suggestions to the user, when he/she types in an editable text field. We can do that via AutoCompleteTextView, that gives suggestions automatically and display them to a drop down menu, from which the user can choose a preferred item.
  • Android TextView Example
    Android system provides us TextView, from where we can display text into the screen. Although it contains text editing operations, the basic class does not allow editing, so EditText class is provided for this reason.
  • Android VideoView Example
    When we want to create an Android application that has an Android Activity inside of which we are planning to play a video file, we should consider in the first place Android VideoView class.
  • Android Menu Example
    We ‘re gonna see how to create a Menu with icon items, which on click, fire a respective to them message. What differentiates this article from other similars, is that we ‘re using the latest Android APIs, where Menus are manipulated differently.
  • Android ViewFlipper Example
    ViewFlipper is an extension class of ViewAnimator, which animates between two or more views that have been added to it. Specfically, only one child is shown at a time. To get a better understanding, suppose that we have two TextViews that will be used in our app, but we want only one to be displayed at a time.
  • Android SurfaceView Example
    In this example, we are going to see the use of Android SurfaceView through a camera appliction that will use the SurfaceView to preview the camera angle to the screen of the mobile device.
  • Android ViewPager Example
    We are going to create an AppCompatActivity, and we are going to add a ViewPager reference and in it, as well as a FragmentPagerAdapter that will help us navigate between the Fragments that our ViewPager will consist of and that we are going to create.
  • Android RecyclerView Example
    For years now, in Android, if you wanted to create an application that uses lists to display data, the most common, choice, would be the ListView solution. However, the Android Lollipop introduces a new and faster way to represent list layouts, with the use of Android RecyclerView.
  • Android Custom Font TextView
    In Android Development we do not have the option to use any other custom font in our default TextView in an xml layout file, except from the default Roboto font. And the choices that Android gives us are limited, by letting us set only normal, sans, serif or monospace fonts, which are usually not enough, especially when we want to customize our application.
  • Android Custom Font TextView
    In Android Development we do not have the option to use any other custom font in our default TextView in an xml layout file, except from the default Roboto font.
  • Android StackView Example
    Generally, StackView is an AdapterView thus working with StackView is not significantly different than is working with any other AdapterView. You create an Adapter defining the contents (in this case, defining the cards), you attach the Adapter to the StackView, and put the StackView somewhere on the screen.

Android Tutorials – Layouts

A layout defines the visual structure for a user interface

  • Android UI: Layouts with View Groups and Fragments
    In this course, you will get a look at the fundamentals of Android UI design. You will understand user input, views and layouts, as well as adapters and fragments.
  • Android TableLayout Example
    In Android there are may ways you can arrange the components of your Application on the screen. One of the most common layouts is the TableLayout. In this tutorial we are going to see how TableLayout works with some input components.
  • Android RelativeLayout Example
    One of the most common layouts is the RelativeLayout. In this tutorial we are going to see how RelativeLayout works with some input components.
  • Android LinearLayout Example
    In this tutorial we are going to see how LinearLayout works with two different orientation options, for three buttons. An important feature that we are going to discuss is the android:layout_weight attribute of the buttons. This attribute determines the proportion of the screen that each button is going to cover.
  • Android Header and Footer layout example
    In this article we are going to see how you can create a simple Android Layout that includes a header part, a footer part and the content area. It is relatively easy to do that in the Android platform. The important bit is to try to make your layouts reusable and independent from one another.
  • Android fixed Header and Footer with scrollable content layout example
    In this tutorial we are going to see how you can create a simple Android Layout with a fixed header and footer but with a scrollable content. You may find this particularly useful when some components of your layout should always be visible to the user despite the number of items to be displayed.
  • Android Accelerometer Example
    In this example, we will make an Activity that can listen to Android Accelerometer changes, that can show the current and max x,y,z values, and can vibrate when the accelerometer values are over a certain threshold.
  • Android TabLayout Example
    In this example, we will be going through the process of creating a basic user interface using the tab layout constructs available on the Android platform. In Android, the TabLayout is a construct for better organizing a user interface. It does so by making the user interface more organized and less cluttered.

Android Tutorials – Animations

Learn how to add animations in your apps to achieve a better sense of the interface quality

  • Android Animation Example
    In this example we will define animations through a sequence of XML instructions in order to show simple transformations (fade, zoom, rotation and motion). Also, we will learn how to use the AnimationListener class in animations.
  • Android Activity Transition Example
    In this example, we are going to define simple transition animations in XML resource files and use them as simple transitions between the Android Activities of our example.

Android Tutorials – Services

Learn the Android Service, one of the most important components and building blocks in an Android System

  • Android Service Example
    The Android Service is one of the most important components and building blocks in an Android System. One obvious characteristic of the Service component is that it offers no UI.
  • Android Location Based Services Application – GPS location
    With the incorporation of GPS devices in smartphones, Location Based Services (LBS) have become pretty hot the past few years. The iPhone was the first to give a huge boost to this kind of applications and now Android continues on the same path. In this tutorial, I will show you how to build your first LBS application for Android.
  • Android startActivityForResult Example
    In Android, the startActivity(Intent) method is used to start a new activity, which will be placed at the top of the activity stack. It takes a single argument, an Intent, which describes the activity to be executed. However, sometimes we might want to get a result back from an activity when it ends.
  • Android Broadcast Receivers Example
    The Android system uses broadcasts messages (often are called Intents or Events) to transfer information to applications. The Broadcasts can be sent either by Android apps or, most commonly, by the system itself. There are many system generated events that Intent class defines for receiving broadcasts.
  • Android Content Provider Example
    A Content Provider is used to share and access data from a central repository. Usually android applications keep data hidden from the other applications but sometimes, it is useful to share data across them. So, content provider is a suitable reason to share data with other applications, based on a standard interface.
  • Android Intents and Intent Filters Example
    An Android Intent is a “message object” that its purpose is to activate a component of an application (activity, service or broadcastreceiver). Intents allow you to interact with components that belong either at the same application or outside that application. It is an abstract description of an operation to be performed or announced.
  • Android Bundle Example
    We are going to show a basic Android Bundle Example, that passes certain values from the main AndroidBundleExample Activity to the AndroidSecondActivity via Android Bundle. In order to achive this, will use the following tools in a Windows 64-bit platform: JDK 1.7, Eclipse 4.2 Juno, Android SDK 4.4.2
  • Android Start Service on Boot Example
    In the mobile device world, many times, we may need to make an application that has to do some tasks in the background, without the users to have to open their application. Some easy examples are the background Location tracking, or an alarm application, or the applications that want to receive push events from a server.

Android Tutorials – Communication

Simple examples on how to use Android apps for communication

  • Android Sending SMS Example
    The use of SmsManager facilitates the sms sending because it gives us the opportunity to customize this functionality with the manner we want, within our own Activity. In parallel, the use of Intents implies the use of built-in applications and sms clients that are installed in each Android device.
  • Android Make Phone Call Example
    Although Android provides Built-in applications for phone calls, in some occasions we may need to make a phone call through our application. This could easily be done by using implicit Intent with appropriate actions.
  • Android Sending Email Example
    To send an email from your application, you don’t have to implement an email client from the beginning, but you can use an existing one like the default Email app provided from Android, Gmail, Outlook, K-9 Mail etc.
  • Android Bluetooth Connection Example
    The Android platform includes support for the Bluetooth network stack, which allows a device to wirelessly exchange data with other Bluetooth devices.

Android Tutorials – Media

Simple examples on how to use Android Media

  • Android UI: Adding Multimedia to an App
    In this article, we will cover some multimedia and graphic aspects in Android. The Android SDK provides a set of APIs to handle multimedia files, such as audio, video and images.
  • Android Audio Capture Example
    In this example, we are going to capture audio from the device’s microphone, store it to the device and then play it back and/or stop playing it.
  • Android MediaPlayer Example
    The Android multimedia framework includes support for playing variety of common media types, so that you can easily integrate audio, video and images into your applications using MediaPlayer APIs. Android MediaPlayer class can be used to control playback of audio/video files and streams.
  • Android Camera Example
    We are going to see the use of Android Camera api in a more detailed way, and develop an Android application that takes photos and switches between the front and the back camera of our mobile device.
  • Android Audio Manager Example
    Android system provides us control access to our ringer profile. We can include in our applications volume and ringer mode control by using AudioManager class.
  • Android SoundPool Example
    When we want to create an Android application that has an Android Activity inside of which we are planning to play a sound sample, we should consider in the first place Android SoundPool class.The SoundPool class manages and plays audio resources for applications.
  • Android Video Capture Example
    In this example, we are going to see the use of Android Video API in a more detailed way, and develop an Android application that captures video and switches between the front and the back camera of our mobile device.
  • Android Barcode and Qr Scanner Example
    In this example, we are going to see how the Android Barcode and Qr Scanner is implemented via the use of the ZXing (Zebra Crossing) library, which will help us to carry out barcode scanning within an Android app.
  • Android Multitouch Example
    A multi-touch gesture is when multiple pointers (fingers) touch the screen at the same time. The basic class for support touch and multitouch in Android is the MotionEvent class. Motion events describe actions in a set of axis values. The actions are the states that occur when a finger is going down or up.

Android Tutorials – Third Party Integration

Learn how to use Android with 3rd party applications and services

  • Android Foursquare API Example
    In the example, we are going to see how can we use one of the most famous, public, social APIs, The Foursquare API. Foursquare is a local search and discovery service mobile and web app which provides a personalized local search experience for its users.
  • Android Google Places API Example
    In the example, we are going to see how can we use one of the most famous, public, social APIs, The Google Places API. The Google Places API allows you to query for place information on a variety of categories, such as: establishments, prominent points of interest, geographic locations, and more.
  • Android Facebook Login Example
    Many times, a considerable way to make this happen, is by connecting your app to Facebook; but you don’t want to waste much time and effort, learning something completely new and this is what Facebook also cared about, so the Android Facebook SDK helps you integrate and connect your Android apps, with Facebook, quite easily.
  • Android Google Analytics v4 Example
    Google Analytics is a service offered by Google that generates detailed statistics about a website’s traffic and traffic sources. It’s the most widely used website statistics service. However, nowadays, that mobile applications traffic has increased, detailed statistics from mobile platforms are also very important.
  • Android Dropbox Implementation Example
    In this example we will see how to create a Dropbox Application. Visit https://www.dropbox.com/developers/apps and after signing-in with an existing account, click on the “Create app” button, on the top right corner.
  • Android Google Plus Login Example
    In this example, we are going to see how can we use one of the most famous, public, social APIs, The Google Plus API. The Google Plus API allows you to connect with more users by integrating social into your Android app.
  • Android Google Places Autocomplete API Example
    In the example, we are going to see how can we use one of the most famous, public, social APIs, The Google Places API. The Google Places API allows you to query for place information on a variety of categories, such as: establishments, prominent points of interest, geographic locations, and more.
  • Android Fabric Crashlytics Integration
    In this example, we will see how we can use Fabric via Android Studio in order to add Crashlytics in our Android application and implement the crash tracking service step by step.
  • Android Location API using Google Play Services Example
    The great power of mobile applications software, is that it gives us the opportunity to develop many ideas that use hardware features, in order to complete simple everyday tasks. One of the unique features of mobile applications is the location awareness.
  • Building Android Applications with Gradle
    Gradle is an advanced build system as well as an advanced build toolkit allowing us to create custom build logic through plugins. Gradle can automate our building, testing, deploying tasks and many more and is the next generation build system for Java technologies that includes some advantages from older tools like Ant or Maven systems.
  • Android Twitter Login and Twitter Post Example
    Twitter has recently released a new software development kit. It’s name is Fabric and it provides a set of crash reporting and mobile analytics tools for mobile applications. Moreover, gives a more direct and easy way for mobile programmers to integrate the Twitter authorization and login procedure and use Twitter post API.

Android Tutorials – Android Game

Learn the Java programming language API and external libraries/frameworks for developing games on the Android platform

[undereg]

Back to top button