Android notifications example

What is android notifications?

Definition from Android developers site:

A status notification adds an icon to the system’s status bar (with an optional ticker-text message) and a notification message in the notifications window. When the user selects the notification, Android fires an Intent that is defined by the Notification(usually to launch an Activity). You can also configure the notification to alert the user with a sound, a vibration, and flashing lights on the device.

What are we going to develop?

The application which we are going to develop will have two buttons – one to trigger notification and other to clear the triggered notification.

Read More

Android RelativeLayout example

What is Android layout?

Layout denotes the architecture of the application, where and how the controls should be organized in the UI.It defines the layout structure and holds all the elements that appear to the user.

Android allows us to create layouts for the applications using simple XML file and those layouts must be placed in /res/layout folder.

We can declare the layout in two ways and here we will discuss first way of doing it:

  1. Declare UI elements in XML
  2. Create UI elements at runtime using Java.
Read More

Android LinearLayout example

What is Android layout?

Layout denotes the architecture of the application, where and how the controls should be organized in the UI.It defines the layout structure and holds all the elements that appear to the user.

Android allows us to create layouts for the applications using simple XML file and those layouts must be placed in /res/layout folder.

We can declare the layout in two ways and here we will discuss first way of doing it:

  1. Declare UI elements in XML
  2. Create UI elements at runtime using Java.
Read More

How to turn on/off only camera flashlight – simple torch example

In this post, we are gonna develop a simple torch application which uses android device’s flashlight. Application will have only one button at the center of the layout which is used to turn on/off the camera flashlight.

When you press ‘Torch-ON’ button, our program calls system packages to turn on flashlight and the button text is changed to ‘Torch-OFF’ . Similarly when button is pressed again, it calls system packages again to turn off flashlight and changes the button text to ‘Torch-ON’.

Let us begin..

Read More

Simple eMail Activity

In this post, we are going to develop a simple email application where you can send email.

What it is gonna do?

You have to enter the email ID, subject, message and hit send, on hitting send button you will be prompted with list of email clients installed in your mobile to choose. Choose email client,say GMail, information you typed in our application will be taken to GMail application. Now all you have to do is hit ‘Send’ in GMail application. 🙂

Let us begin with the development..

Read More

Click-Pick-Set – Simple Camera Activity

This post is all about how to use camera activity in your Android application. Let me give a quick glance of what we are going to develop today. We will have one image view and two buttons (one for taking picture and other for setting wallpaper) in our application. When you click Take photo button, will take you to default camera present in your device and capture the image. You can set the clicked image as your wallpaper just by clicking Set as Wallpaper button. Does it sound interesting?.. I hope YES.. 🙂

Let’s begin…

Read More

Android Activity Life Cycle

We had a quick glance on “What an android activity is?” in our previous post, here we are going to discuss about Life cycle involved in an android activity.

Activity in the system is managed as an activity stack. When a new activity is started, it is placed on the top of the stack and becomes the running activity — the previous activity always remains below it in the stack, and will not come to the foreground again until the new activity exits. It might be little bit confusing, let me explain it with an example:

Assume you open Facebook app in your android mobile, you are looking through the shares/posts posted by your friends and you are coming across one interesting web link posted by your friend. You click on the link to view what is there inside, it takes you to web browser and open up the website.

Read More

What is an Android Activity?

In this post, we are going to discuss about ‘Activity’, for newbies the term ‘Activity’ might be looking like a jargon. Let us discuss it with a very simple example.

What is an Activity?

Activity is a Java code that supports a screen or UI. In other words, building block of the user interface is the activity.

Activity class is a pre-defined class in Android and every application which has UI must inherit it to create window.

Let us create a simple application which displays current time when you just tap the window. We will dissect the code to understand how the activity works.

Read More
Page 13 of 14« First...1011121314
Join now to get more access to our Android Tutorials

Join now to get more access to our Android Tutorials

Once you Join, you will receive Mail containing latest Android Tutorials once a month !!

I promise I wont spam you !!

You have Successfully Subscribed!

Pin It on Pinterest

Shares