Home » Android (page 20)

Android

Android Activity Recognition

Activity Recognition gives our Android device the ability to detect a number of our physical activities like walking, riding a bicycle, driving a car or standing idle. All that by simply using an API to access Google Play Services, an increasingly crucial piece of software available to all Android versions. As in the article on geofencing, we will download the ...

Read More »

Send Email with Attachment in Android

This is a simple demo for send email in Android with attachment. For attachment I am using Intent.ACTION_GET_CONTENT. Don’t forget to add permissions in your manifest.xml-               <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 1)MainActivity.java package com.manish.sendemaildemo; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import ...

Read More »

Google account Integration in Android – Login with Gmail

Hello Friends, This is my post for Google account integration with your application,  login with gmail, signup with Google account. Some important step is given below- Step 1- Create new project say GoogleProfileDemo. Step 2- Add “Google play service” libray project. Step 3 – Add needed permission in manifest.xml-     <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> ...

Read More »

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, so you can use it ...

Read More »

Adding Overlay Icons to ImageViews

While working on Serenity for Android, one of the many requests I received was to have a Watched Status indicator appear over the poster. There are a couple of ways to do this on Android. Use a Canvas and draw the overlay icon on to the existing bitmap Use a Layout and overlay the icon as needed. The first approach ...

Read More »

Android ViewHolder Pattern Example

Now we are going to code the smooth scrolling of our Android ListView. In the previous post, we tried to understand how the ListView with adapter works. This time, it will be all about performance. I did this a separate post because Android ListView is difficult to understand at times. What I have in mind is, “we have to do ...

Read More »

Android Sensor Tutorial: Barometer Sensor

One of the most interesting topics in my opinion is how to use Sensor in Android. Nowadays our smartphone are full of sensors and we can use it to control somehow our app. The most common sensors are: GPS Proximity sensor Light sensor Temperature sensor Barometer sensor NFC just to mention some of them. In this post we will explain ...

Read More »

Detecting Television Feature on Android

I wrote up a post on google plus, that may be interested to a wider audience.  If you are an android app developer and want your app to work well on a Television or set top box, you need know if you need to handle focus specially or not for these devices.  Here is one way to know when you ...

Read More »

Android ListView with Adapter Example

How android ListView with adapter works is not so clear to me until I read this awesome examples and article of Lucas Rocha: Performance Tips for Android’s ListView. Today I’m going to show you the code I use whenever I wanted the user to select an “item” in an AlertDialog with ListView. If you are looking for an example AlertDialog ...

Read More »