Play all songs from your raw directory in ANDROID continuously.
In ANDROID all resource has a unique resource ID which we get by passing the song name to the function below playSong(). The function getAllResourceIDs() will convert this String which is the name of...
View ArticleHow to use MediaPlayer in ANDROID? A simple example.
MediaPlayer class can be used to play Audio in ANDROID. See how to do this. MediaPlayer mp = new MediaPlayer(); mp = MediaPlayer.create(MyClassName.this,songId); try { mp.prepare(); } catch...
View ArticleHow to record an audio in android and email it as attachment?
This example shows how to record an audio in android and save it in your path and send it as an email attachment. This example is taken from the developers website. Note : You should run this on the...
View ArticleHow to check whether a video has completed playing in android?
Hello all… Today I will show you how to get notified when a video completes playing in android. PLease check this post for playing a video and the resources. First create a folder named “raw” inside...
View ArticleHow to stream an audio in Android?
This is a simple example to how to stream an audio in android. Here is the java code for that. package com.coderzheaven.pack; import android.app.Activity; import android.app.ProgressDialog; import...
View ArticleUsing Different Media Libraries in Android
Android provides two main API’s for playing sounds. SoundPool MediaPlayer SoundPool SoundPool can be used for small audio clips. It can repeat sounds and play several sounds simultaneously. The sound...
View ArticleHow to encrypt and decrypt an audio file in Android?
Here is a simple example to encrypt and decrypt a audio file in Android. We will directly go to the implementation part. Demo Video You can check the demo video here. Download Library You can download...
View Article