Thursday, August 30, 2012

Get Contact List and Send them Message at once (Group Message view intent)


Cursor cursor;
      
        private void populateContactList() {
               // Build adapter with contact entries
                                          
              cursor = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
                                         new String[] { BaseColumns._ID, Phone.DISPLAY_NAME,Phone.NUMBER }, null, null, null);
              startManagingCursor(cursor);

how to get contact list android phone code


Just copy and pest following code use this function.

 private void populateContactList() {
       // Build adapter with contact entries

Monday, June 25, 2012

arrayadapter example in android


package de.vogella.android.listactivity;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

Saturday, June 23, 2012

Tabbed Applications in Android


Introduction

Sometimes, we want to wrap multiple views in a single window and navigate through them with a Tab Container. This can be done in Android using TabHost control.
There are two ways to use a TabHost application in Android:
  1. Using the TabHost to navigate through multiple views within the same activity.
  2. Using the TabHost to navigate through Actual multiple Activities using intents.
We will explain both ways through this tutorial.

Anatomy of Tabbed Application

Monday, June 18, 2012

A simple example using VideoView to play 3gp from YouTube

A simple example using VideoView to play 3gp from YouTube

ScrollView and HorizontalScrollView

ScrollView and HorizontalScrollView

ScrollView and HorizontalScrollView are layout container for a view hierarchy that can be scrolled vertically or horizontally by the user, allowing it to be larger than the physical display. A ScrollView/HorizontalScrollView is a FrameLayout, meaning you should place one child in it containing the entire contents to scroll; this child may itself be a layout manager with a complex hierarchy of objects.

Monday, May 28, 2012

How to post on facebook wall using Facebook android SDK ,(This is Reusable Intent)


Use Following Intent As 


Intent postOnFacebookWallIntent=new Intent(this, ShareOnFacebook.class);




postOnFacebookWallIntent.putExtra("facebookMessage","Message Here to Post")

startActivity(postOnFacebookWallIntent);

Code for ShareOnFacebook  Intent

Friday, May 25, 2012

Start Email-Activity with Preset Data (via Intents)

Hurry - Plan a Trip for Father's Day and Save up to 65%! Compare Now!

/* Create the Intent */
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
/* Fill it with Data */
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"to@email.com"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Text");
/* Send it off to the Activity-Chooser */
context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));

Wednesday, May 23, 2012

Android Intent Usage

Android Intent Usage


//show webapp:
Uri uri = Uri.parse("http://www.google.com");
Intent it  = new Intent(Intent.ACTION_VIEW,uri);
startActivity(it);

Saturday, May 19, 2012

Calculate Speed Of Android Device By GPS

First Add These Permissions to Manifest File.



<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" />

Live Streaming On Android



  1. Create Project Name As Live Streaming.