Tag Archives: Intent

Check if the Device is Charging in Android and the Power Source.

By | February 20, 2017

Your application peformance should be upto the mark. But it should perform differently not on the front end , but on the back end when it the device is connected to a power source or charging. Charging could be of from USB and from wire cable. When your device is charging itself , it is… Read More »

Adding Notifications, Reading Notifications, Getting number of notifications in Android M.

By | February 20, 2016

This demo will show how to 1. Create and add a new Notification, 2. How many notifications are active in the current Application? 3. Delegate method for Notification Deletion. For Adding a Notification we can use the following snippet. For reading the number of currently Active notifications we can use To know when a Notification… Read More »

How will you create a custom Notification in Android with a custom Layout?

By | September 15, 2012

This sample application does that. First create an xml for your notification. custom_notification.xml Now the java code.

Using Tabbars in ANDROID, A Simple Example……….

By | April 22, 2012

This is a simple example showing how to use tabbars in ANDROID. First create a new project and copy this code to it. Now create three another java files by right clicking the src folder and name it FirstTab.java, SecondTab.java, ThirdTab.java. Now copy the following code to FirstTab.java. SecondTab.java Now ThirdTab.java. Main.xml file AndroidManifest.xml You… Read More »

Select an Image from gallery in ANDROID and show in an ImageView.

By | April 20, 2012

Hi all In this tutorial I will show you how to get an image from your phone gallery and show it in an imageview.Here we use intents to open up the image gallery and get the image URI.   Demo   Watch Video Tutorial   Steps : Ask storage permission from the user if the… Read More »

Uploading audio, video or image files from Android to server

By | March 29, 2012

Hello everyone, Check out the popular posts from Coderzheaven.com Uploading and Downloading of files – Popular and Useful posts from CoderzHeaven In one of the previous posts I have shown one method to upload an image in android. Here is another method to upload a media file like images,audio or video in android. Here is… Read More »

Passing data between Intents or classes in ANDROID?

By | March 29, 2012

Many of our application reqiures sending data from one intent to another. This is done by putting data into one intent using putExtras() and getting it in the other intent using the getExtras() which matches the string value. However you can pass string, boolean, integer etc between intents. For passing data between intents you need… Read More »

Global variables in ANDROID……

By | May 17, 2011

Hi all……. In today’s exampl e I will show you how to deal with global variables in ANDROID. You know global variables are those variables that you can access across any variables. It’s value becomes changed when you change it in any of the classes in your project. These types of variables act as like… Read More »

How to use Global variables in ANDROID?

By | May 17, 2011

Hi all……. In today’s exampl e I will show you how to deal with global variables in ANDROID. You know global variables are those variables that you can access across any variables. It’s value becomes changed when you change it in any of the classes in your project. These types of variables act as like… Read More »

How to send email from and ANDROID Application programatically?

By | May 16, 2011

Hello all…….. In today’s post I will show you send mail from an android application progrmatically.. Let’s go to the code fast…… This is the code in the mail java file…. Now the layout file (main.xml) The AndroidManifest.xml Note: However if you test this in your emulator, it will not work. Install it in your… Read More »

ANDROID Tabbars Example……..

By | May 9, 2011

This is a simple example showing how to use tabbars in ANDROID. First create a new project and copy this code to it. Now create three another java files by right clicking the src folder and name it FirstTab.java, SecondTab.java, ThirdTab.java. Now copy the following code to FirstTab.java. SecondTab.java Now ThirdTab.java. Main.xml file AndroidManifest.xml You… Read More »

Using Tabbars in ANDROID, A Simple illustration……….

By | May 9, 2011

This is a simple example showing how to use tabbars in ANDROID. First create a new project and copy this code to it. Now create three another java files by right clicking the src folder and name it FirstTab.java, SecondTab.java, ThirdTab.java. Now copy the following code to FirstTab.java. SecondTab.java Now ThirdTab.java. Main.xml file AndroidManifest.xml You… Read More »

Using Tabbars in ANDROID, A Simple Example……….

By | May 9, 2011

This is a simple example showing how to use tabbars in ANDROID. First create a new project and copy this code to it. Now create three another java files by right clicking the src folder and name it FirstTab.java, SecondTab.java, ThirdTab.java. Now copy the following code to FirstTab.java. SecondTab.java Now ThirdTab.java. Main.xml file AndroidManifest.xml You… Read More »

Listening incoming sms message in Android

By | May 1, 2011

When a new sms message is received by the device, a Broadcast Receiver is registered. For this IntentFilter filter = new IntentFilter(SMS_RECEIVED); registerReceiver(receiver_SMS, filter); should be included . Also sms are sent in PDU’s(Protocol Description Units) format, which act as an encapsulation. Inorder to extract from PDU to byte array messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]); method… Read More »

How to get notified during an incoming call and get that number inside your program in ANDROID?

By | April 24, 2011

Hi all……. In today’s tutorial I will show you how to get the incoming phone number inside your application. In many situation we may need this. For this we need to have BoradCastReceivers. Inside this class we create an object of the TelephonyManager class ang register with the sytem service.Now we have to make another… Read More »

How to open browser in an ANDROID application? How to open a URL from an ANDROID application?

By | March 28, 2011

Hi all,In this tutorial I will show you how to open browser from an ANDROID application. This is done through intents. You know that intents are used to invoke other activities. So we here invoke the browser activity. The following code will open the default browser in your ANDROID phone. This is the manifest file… Read More »

Using NotificationManager in ANDROID for showing notification, sample code.

By | March 18, 2011

Multiple Notifications are a unique feature in ANDROID phones. This tutorial will show you how to create notification from your application. ANDROID uses the NotificationManager class to create the notification. Let’s look at the code. Explanation. mManager.notify(APP_ID, notification); This line in the code sends the notification where notification is the object of the Notification class… Read More »