Tuesday, April 14, 2009

DoidDraw Tool For Android

The Great UserInterface Designer Tool for Android Is DoidDraw .......
The Examples For that Doid draw using the Tool
For Example Tutorials see the Below Links

http://www.droiddraw.org/tutorial1.html

http://www.droiddraw.org/tutorial2.html

http://www.droiddraw.org/tutorial3.html

In the Emulater We can Check the Code put By installing this software

the layout.xml file output can see by using this software which is given below ...

http://www.droiddraw.org/androiddraw.html

Monday, April 6, 2009

Android : MediaPlayer Example

First Create a MediaPlayerDemo.java Project File

package com.example.android.apis.media;
import android.app.Activity;import android.media.MediaPlayer;import android.os.Bundle;import android.util.Log;import android.widget.TextView;import android.widget.Toast;
import com.example.android.apis.R;
public class MediaPlayerDemo_Audio extends Activity {
private static final String TAG = "MediaPlayerDemo";
private MediaPlayer mMediaPlayer;
private static final String MEDIA = "media";
private static final int LOCAL_AUDIO = 1;
private static final int STREAM_AUDIO = 2;
private static final int RESOURCES_AUDIO = 3;
private static final int LOCAL_VIDEO = 4;
private static final int STREAM_VIDEO = 5; private String path;
private TextView tx;
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
tx = new TextView(this);
setContentView(tx);
Bundle extras = getIntent().getExtras();
playAudio(extras.getInt(MEDIA));
}
private void playAudio(Integer media)
{ try
{
switch (media)
{
case LOCAL_AUDIO:
/** * TODO: Set the path variable to a local audio file path. */ path = "@E:/raww/test_cbr";
if (path =="")
{
// Tell the user to provide an audio file URL.
Toast .makeText( MediaPlayerDemo_Audio.this, "Please edit MediaPlayer_Audio Activity, " + "and set the path variable to your audio file path." + " Your audio file must be stored on sdcard.", Toast.LENGTH_LONG).show();
} mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource("@E:/raww/test_cbr");
mMediaPlayer.prepare();
mMediaPlayer.start();
break;
case RESOURCES_AUDIO:
/** * TODO: Upload a audio file to res/raw folder and provide * its resid in MediaPlayer.create() method. */
mMediaPlayer = MediaPlayer.create(this, R.raw.test_cbr);
mMediaPlayer.start();
}
tx.setText("Playing audio...");
} catch (Exception e)
{
Log.e(TAG, "error: " + e.getMessage(), e);
}
}
@Override protected void onDestroy()
{
super.onDestroy();
//
TODO Auto-generated method stub
if (mMediaPlayer != null)
{
mMediaPlayer.release();
mMediaPlayer = null;
}
}
}

Android API : Media Player

Package Android.media

Interfaces
MediaPlayer.OnBufferingUpdateListener
Interface definition of a callback to be invoked indicating buffering status of a media resource being streamed over the network.
MediaPlayer.OnCompletionListener
Interface definition for a callback to be invoked when playback of a media file has completed.
MediaPlayer.OnErrorListener
Interface definition of a callback to be invoked when there has been an error during an asynchronous operation (other errors will throw exceptions at method call time).
MediaPlayer.OnPreparedListener
Interface definition for a callback to be invoked when the media file is ready for playback.
MediaPlayer.OnSeekCompleteListener
Interface definition of a callback to be invoked indicating the completion of a seek operation.
MediaScannerConnection.MediaScannerConnectionClient
An interface for notifying clients of MediaScannerConnection when a connection to the MediaScanner service has been established and when the scanning of a file has completed.

Classes
AsyncPlayer
Plays a series of audio URIs, but does all the hard work on another thread so that any slowness with preparing or loading doesn't block the calling thread.
AudioManager
AudioManager provides access to volume and ringer mode control.
FaceDetector
Identifies the faces of people in a Bitmap graphic object.
FaceDetector.Face
A Face contains all the information identifying the location of a face in a bitmap.
MediaPlayer
Used to play audio and video files and streams.
MediaRecorder
Used to record audio and video.
MediaRecorder.AudioEncoder
Defines the audio encoding.
MediaRecorder.AudioSource
Defines the audio source.
MediaRecorder.OutputFormat
Defines the output format.
MediaScannerConnection
MediaScannerConnection provides a way for applications to pass a newly created or downloaded media file to the media scanner service.
Ringtone
Ringtone provides a quick method for playing a ringtone, notification, or other similar types of sounds.
RingtoneManager
RingtoneManager provides access to ringtones, notification, and other types of sounds.
SoundPool

ToneGenerator
This class provides methods to play DTMF tones (ITU-T Recommendation Q.23), call supervisory tones (3GPP TS 22.001, CEPT) and proprietary tones (3GPP TS 31.111).

Android: Table Of Contents

Android Basics
What Is Android?
Framework Topics
Application Fundamentals
User Interface
Resources and Assests
Intents and Intent Filtering
Data Storage
Content Providers
Security and Permissions
The AndroidManifest.xml File
Graphics
Audio and Video
Location
Developing
In Eclipse, with ADT
In Other IDEs
On a Device
Debugging Tasks
Tools
Publishing
Signing Your Applications
Versioning Your Applications
Preparing to Publish
Publishing Your Applications
Best Practices
Designing for Performance
Designing for Responsiveness
Designing for Seamlessness
Tutorials and Sample Code
Hello World
Hello Views
Notepad Tutorial
Sample Code »
Appendix
Supported Media Formats
Intents List: Google Apps
Glossary
FAQ

Android SDK Download

Welcome to the Android SDK!
If you've just downloaded the SDK, then continue with Installing the Android SDK.
If you're upgrading from a previously installed version, then refer to the Upgrading guide.
Once you've completed the SDK installation, you can start learning about development on the Android framework by reading the Developer's Guide. The SDK package also includes a wide variety of very helpful code samples.
Please note that you are currently viewing a local, offline version of the Android developer documentation. The offline documentation offers the same content and features as the online documentation, but since the search capability is network-based, it will not work while you are offline. Autocompletion for API packages and classes, also offered from the search box, is available both online and offline and loads the reference documentation for the item you select.
For the most current, fully searchable documentation, please visit

http://developer.android.com.