Problem with Simple Audio Recorder Application : Android

by Jason » Sat, 07 Mar 2009 10:53:19 GMT

Sponsored Links

I have written a simple Application to record audio.

SD card is enabled in emulator using "./emulator -sdcard sd_card.img".
when i enter this command, it displays warning saying "Audio output is

the application runs properly but i cant see the recorded file.

output file is set to "sdcard/test.3gpp" (setOutputFile("/sdcard/test.

earlier i used "environment.getExternalStorageDirectory()" option to
get the path.. den i could see the recorded contents in "Music - >
Songs" in Emulator. But when i tried to play those, it says format not
supported("sorry, the player doesnot support this kind of audio
file"). i pulled that file using ADB ( "adb pull local_file /sdcard/
remote_file") on to system and tried to play it but unsuccessful.

I have altered the Android manifest file to give the AUDIO permission
aftre the <intent filter >field in the file.

Plesae help me....

Thanks in Advance....


Other Threads

1. How to pass large amount of data during startActivityForResult

That *is* a real answer. As is using a service -- which is probably the
direction I would go, given the limited info you have provided -- but
you rejected that out of hand.

As I wrote, you need to have two activities share 1MB of Strings. This
does NOT mean you have to pass them via an Intent. And, as you have
discovered, you cannot pass them via an Intent, in any case.

Either reduce the amount of data by a factor of 100 or so, or use a
service, or use a custom Application object, or use a static data
member, or use a file. Remember: your two activities should be in the
same process, and hence the same VM, so all you need to do is be able to
reference those strings from the same place.

Mark Murphy (a Commons Guy) |

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.2 Available!


2. Saving service killing without "startForeground"


I am running a background Android Service as VoIP Framework which
provides different VoIP services to different Android applications,
(VoIP call, Video Call, etc). The service establishes a network
connection with the Server(Service Provider) and does some initial
handshake before it can start providing service to the Android
applications, that why though of starting the service on

The problem is when the service gets started on BOOT_COMPLETED event,
before even it finishes the initial network connection with server and
handshaking, it gets killed by the system.

I have tried using setForeground which improves the behavior a bit but
still gets killed mid-way. I am working with old version 1.5 r3 of SDK
and hence, cannot use "startForeground".

Is there a way out or another alternative available with SDK 1.5 r3?

Thanks in advance,


3. Managed dialogs with state changes

4. Getting a Gmail new message intent

5. Loading Activity Darkens Screen/Loading Screen

6. "cannot find symbol" error when build CTS after update few source code

7. Help with cropping the top of an ImageView