Android :: Is There Way To Phone And Play Audio File In Android ?

May 5, 2009

I would like to create an ermergency call application : if triggered, it calls a given number and play an audio file, giving the information the caller couldn't give himself.For that I need to engage a call but ensure that I can replace any sound from the speaker with an played audio file. Can I do that in android ? What's the way?

Android :: Is there way to phone and play audio file in android ?


Android :: Play Remote Audio File In Android Audio Player

Nov 12, 2010

I am working on a application that would allow users to play remote files. My question is how do I open those remote files to be played in the default android player?but this does not give me control of what is happening!

View 2 Replies View Related

Android :: Play Audio File From Assets Directory

Jul 20, 2010

when I run this code, it starts playing all the audio files in the assets directory, in alphabetical order instead of just playing the audio file I requested. What am I doing wrong? Is there a better way to play audio files from the assets directory?Is there a difference between keeping audio files in the assets directory and keeping them in the res/raw directory? Besides the fact that they don't get ids if they are in the assets directory. If I move the audio files to the res/raw folder then I have a problem with reusing MediaPlayers because there is no id parameter for setDataSource(). I can't find a good guideline for handling this kind of problem.

View 1 Replies View Related

Android :: Play Audio From Stream / Stored Cache File

Feb 10, 2010

How to play audio from a stream in android? I will get input stream from an online link( like continuous FM). I need to cache the stream and play it. I searched a lot in sites,,,but didnt get.They show option of playing from a stored file. There is no option to play from a stream.

View 2 Replies View Related

Android :: Resume Activity And Play Audio File After Spawned Thread Completes Download?

Jan 13, 2010

I've got an activity that calls a helper class called DownloadManager. DownloadManager spawns a thread that downloads a mp3 to the sdcard. I'm having some trouble finding the best design for resuming the initial activity and starting the MediaPlayer. Does it make the most sense to use a BroadcastReceiver that receives a message that download is complete, then start a new Intent of my activity? Think I saw something that I can't use an Intent to start an Activity from BroadcastReceiver because it is a background process.

View 4 Replies View Related

Motorola Droid : How To Play Audio From Phone Through RR Audio System?

May 5, 2010

I connected my phone via USB to my RR sport to upload audio files to the RR hard drive. However, I keep getting connection error. Apparently my device is not being recognized as a storage. I did the unmount thinking. Also, I am wondering how I can play audio from my phone through the RR audio system.
RR is 2010.

View 2 Replies View Related

General :: Play WhatsApp Audio AAC File?

Apr 6, 2014

i save whatsapp audio files ( .aac ) , but i cant' play them on pc or phone ...

View 2 Replies View Related

HTC Incredible :: Unable To Play This Type Of Audio File

Jun 4, 2010

I have an HTC incredible and have tried everything to put music on it, the most recent program i am using is tunesync, which works great. However, whenever i transfer music i always get the message "unable to play this type of audio file" I have tried everything from making the files all mp3 format to using different programs to do the sync, but nothing will work.

View 3 Replies View Related

General :: Play Audio File On Voice Call

Dec 17, 2011

I want to play an audio file on a voice call as following the application initiates a call from device X to device Y. When Y replies application on device X should inject an audio file in the stream of the call so device Y hears this audio file

Is possible to inject an audio file in the stream of the call/the output of microphone?

View 2 Replies View Related

General :: Can't Play Any Audio File And See Photos In Gallery

Aug 16, 2012

All apps that play audio files from my device can not find and play any of my songs and audio files that are in my device internal SDcard and I can not see my photos in the gallery.

View 4 Replies View Related

HTC Incredible :: Music Sync - Message Unable To Play This Type Of Audio File

Jun 4, 2010

I have an HTC incredible and have tried everything to put music on it, the most recent program i am using is tunesync, which works great. However, whenever i transfer music i always get the message "unable to play this type of audio file" I have tried everything from making the files all mp3 format to using different programs to do the sync, but nothing will work.

View 1 Replies View Related

Android :: Is It Normal To Play An Audio During Phone Call?

Mar 15, 2009

When you pick up the call and switch the screen to MediaPlayer to play an audio, it is able to be heard from handset (receiver). Thus, you can hear the far-end voice and your local music at the same time. Is it a normal behavior? Android seems not to have the mechanism to let Mediaplayer to remember its status (to keep music pause or mute?) in the phone call. Or this is a normal design for notification sounds, such as a call- waiting sound? Is it possible to have an secondary gain feature like windows mobile in the future?

View 7 Replies View Related

Android :: Audio Record And Play Recorded Audio

Jun 2, 2009

Could you please let me know how to do the audio record in android emulator and play the same recorded audio. Could you please help me in proceeding in development.I tried with MediaPlayer API's also.Its not working.

View 5 Replies View Related

Android :: Analog To IOS Core Audio / Audio File Stream Services?

Sep 22, 2010

Is there an Android equivalent to the iOS Core Audio / Audio File Stream Services? I need to be able to read audio bytes from a network and feed them to the audio system under my control, so I can do my own timeouts / reconnects / range requests / etc. without interrupting the audio playback (since the system audio thread would be playing audio already enqueued). It seems that MediaPlayer doesn't give me this level of control. Is there a lower-level framework that does, either in the SDK or NDK?

View 2 Replies View Related

Android :: Combine Only One Audio File From Two Audio Files

Oct 2, 2010

I want combine two audio files. (A audio file + B audio file = AB audio file)So, my search result is:

1. useing an AudioTrack.

2. decode PCM from audio file.

3. combine PCM.

This is currect? It there another way?

View 1 Replies View Related

Android :: How To Play An Mp3 File Using Default Phone Player?

Nov 12, 2010

I want to play an mp3 file using the default android player. I managed to get the file playing but it plays in the background. I want to have all the nice controls for pausing, playing, etc. I do not know how I could do this! My code...

View 1 Replies View Related

Android :: How To Play Audio Files At Phone Volume Level / Not Speaker Volume

Nov 22, 2010

I'm writing an Android application that plays back voice mails using Media Player, which are just WAV files that have been sent to the device. When I play the file, it's played on the device's speaker, or else it plays through headphones if they're plugged in. What I want to do is play the file so that it sounds to the user as if it's at the same volume level as a normal phone call. Is there a way to route playback so that the file is played through the phone's ear piece instead of out of the speaker?

View 2 Replies View Related

HTC Incredible :: Trying To Play Music - Says Unable To Play This Type Of Audio

Apr 28, 2010

I took out the 8GB SD card from my Blackberry Storm and put it the Incredible.

I had a bunch of music saved on my SD Card that I downloaded from VZW Music Media thing.

When I go to music on the Incredible and go over the song (it shows the picture of the album of the song)

it says "unable to play this type of audio"

View 10 Replies View Related

Android :: Unable To Play File When Set Data Source To Sd Card File

Apr 13, 2009

I am trying to play file which is stored in SDCARD in emulator. I have Linux O/S. So i need to provide command in run configuration. I am providing following parameter.

-sdcard /usr/android/sdcard/mysdcard.iso -audio oss [i]

The following is my code to play file.

try { mMediaPlayer.setDataSource("/sdcard/test_cbr.mp3"); mMediaPlayer.prepare(); // Giving error. mMediaPlayer.start(); }

View 4 Replies View Related

Android :: Play Audio From Stream?

Feb 10, 2010

How to play audio from a stream in android? I will get input stream from an online link( like continuous FM). I need to cache the stream and play it. I searched a lot in sites,,,but didnt get.They show option of playing from a stored file. There is no option to play from a stream.

View 12 Replies View Related

Android :: Getting Audio To Play Through Earpiece

Jan 22, 2010

I currently have code that reads a recording in from the devices mic using the AudioRecord class and then playing it back out using the AudioTrack class.My problem is that when I play it out it plays vis the speaker phone.I want it to play out via the ear piece on the device.Here is my code:public class LoopProg extends Activity {
boolean isRecording; //currently not used
AudioManager am;
int count = 0;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
am.setMicrophoneMute(true);
while(count <= 1000000){
Record record = new Record();
record.run();
count ++;
Log.d("COUNT", "Count is : " + count);
public class Record extends Thread
{ static final int bufferSize = 200000;
final short[] buffer = new short[bufferSize];
short[] readBuffer = new short[bufferSize];
public void run() {
isRecording = true;
android.os.Process.setThreadPriority
(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
int buffersize = AudioRecord.getMinBufferSize(11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT);
AudioRecord arec = new AudioRecord(MediaRecorder.AudioSource.MIC,
11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,
buffersize);
AudioTrack atrack = new AudioTrack(AudioManager.STREAM_MUSIC,
11025,
AudioFormat.CHANNEL_CONFIGURATION_MONO,
AudioFormat.ENCODING_PCM_16BIT,
buffersize,
AudioTrack.MODE_STREAM);
am.setRouting(AudioManager.MODE_NORMAL,1,
AudioManager.STREAM_MUSIC);
int ok = am.getRouting(AudioManager.ROUTE_EARPIECE);
Log.d("ROUTING", "getRouting = " + ok);
setVolumeControlStream(AudioManager.STREAM_VOICE_CALL);
//am.setSpeakerphoneOn(true);
Log.d("SPEAKERPHONE", "Is speakerphone on? : " + am.isSpeakerphoneOn());
am.setSpeakerphoneOn(false);
Log.d("SPEAKERPHONE", "Is speakerphone on? : " + am.isSpeakerphoneOn());
atrack.setPlaybackRate(11025);
byte[] buffer = new byte[buffersize];
arec.startRecording();
atrack.play();
while(isRecording) {
arec.read(buffer, 0, buffersize);
atrack.write(buffer, 0, buffer.length);
arec.stop();
atrack.stop();
isRecording = false;
As you can see if the code I have tried using the AudioManager class and its methods including the deprecated setRouting method and nothing works, the setSpeatPoneOn method seems to have no effect at all, neither does the routing method.Has anyone got any ideas on how to get it to play via the earpiece instead of the spaker phone?

View 5 Replies View Related

Android :: Play Raw Audio From C++ Side

Feb 22, 2010

I need to be able to stream audio from a custom file format on the C++ side of the Android system. I am working on porting a custom media player and need to be able to open a custom file and stream audio from it. This is important as I do not think porting the whole player to JAVA is feasible from a performance stand point and moving the audio buffers through the JNI interface I believe will be too slow to keep a decent frame rate. I can handle the video on the NDK side through OpenGL ES, but the Audio I have no idea how to make this happen.

View 2 Replies View Related

Android :: How To Play Audio From Sd Card?

Jul 12, 2010

I need to download audio from web server and I need to save into device memory. Then, I need to play that audio from my application. I know, how to play audio if that is available in res/raw folder. But, I can't able to play audio from SD Card. I am getting following error: ERROR/PlayerDriver(31): Command PLAYER _ SET _ DATA _SOURCE completed with an error or info PVMFErr Not Supported.

View 4 Replies View Related

Android :: How To Play Audio Files One After Other

Jul 20, 2010

I have multiple audio files in the assets directory of my application. When the user clicks a button I want to play those files in a certain order, one after the other. There shouldn't be any noticeable lag between the audio files. What is the best approach to achieve this? I am thinking of using MediaPlayer objects and OnCompletionListeners. But, that would mean I have to create a lot of OnCompletionListeners because I need to know every time which audio file is next. Am I missing something or is there a better approach?

View 1 Replies View Related

Media :: Droid X - Play Mp3 From Win 7 On Phone Without Transfer File?

Jul 25, 2010

Does anyone know of any instructions or tutorials for how to play an mp3 on my computer on my droid, without having to transfer the file?

View 1 Replies View Related

HTC Droid Eris :: Running 2.1 / Play .wmv File On Phone?

Mar 19, 2010

Just wanted to post on here that I was able to play a .wmv file on my Droid Eris today.

I am running the 2.1 leak from a few weeks ago.

Anyone else able to do this? Just curious and looking to spread good cheer.

View 2 Replies View Related

Motorola Droid : How Can I Play Sound File On Phone?

Jul 23, 2010

I want to play sound file on phone line..Is it possible.If yes then how to do that..which class should i need to refer.

View 1 Replies View Related

Android :: Audio Track Play Music

Sep 6, 2010

I'm an android starter I tused AudioTrack to play music But it just tell me filenotfoundexeception I try to play mp3 wav ogg (all in raw dir) I've no idea where is wrong? here are my code:

CODE:..................

View 3 Replies View Related

Android :: Using Bluetooth To Play Audio In Car From Epic 4G?

Nov 22, 2010

I am looking for an app that will allow me to play music and audio books to my paired bluetooth car audio system. At the moment I can only use it for phone calls.

View 9 Replies View Related

Android :: Stopping And Play Button For Audio

Apr 22, 2010

I have this problem, I have some audio I wish to play. And I have two buttons for it, 'Play' and 'Stop'.Problem is, after I press the stop button, and then press the Play button, nothing happens. -The stop button stops the song, but I want the Play button to play the song again (from the start) Here is my code:final MediaPlayer mp = MediaPlayer.create(this, R.raw.megadeth);And then the two public onclicks: For playing)
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// Perform action on click
button.setText("Playing!");
try {
mp.prepare();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
And for stopping the track
final Button button2 = (Button) findViewById(R.id.cancel);
button2.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
mp.stop();
mp.reset();
Can anyone see the problem with this? If so could you please fix it. (For suggest)

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved