How get MediaRecorder to record in MP3 format

by Marco Nelissen » Sat, 11 Apr 2009 10:28:03 GMT


Sponsored Links
 There is no mp3 encoder included in Android currently, so you can't
record to mp3.


On Fri, Apr 10, 2009 at 5:13 PM, admin.androidsl...@googlemail.com



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Cannot view saved image until reboot

Hey all,

I am saving an image taken by the camera to a unique folder on the
sdcard.  The image saves fine, but I cannot view it in the Gallery.  I
can see it in the file system, but I cannot view the image in the
Gallery app until I reboot the phone or mount the sdcard, and then
umount.


Here's the code:


     public static void saveImageToCard (Bitmap bm, String title,
String description, Context context) {

            //replace and append the title with the correct extension
            title = title.replace(" ", "_") + ".jpg";

            File Directory = new File(Environment.getExternalStorageDirectory
() + "/myFolder");
                File file = new File(Directory.getAbsoluteFile() + "/" + title);

                if (!Directory.exists()) {
                        Directory.mkdirs();
                }

                try {
                        FileOutputStream fos = new FileOutputStream(file);
                        bm.compress(Bitmap.CompressFormat.JPEG, 100, fos);
                        fos.close();
                } catch (IOException e) {
                        e.printStackTrace();
                }

        }



As I said, the file is saved fine, I can see it in the FS, and I can
view it after the card has been umounted/mounted or rebooted.   Is it
an issue that I'm not correctly closing the file??  I don't think
that's it, but I'm not sure why I can't view the image.  I believe I
tried saving the file using getContentResolver().insert() and didn't
have this issue, but I want to save the images to a specific folder
that I create.


Any ideas?


Thanks in advance,

Mike






-- 

2. How to perform Web Search without requiring UI

Hi,
If anyone can guide me  on  how can I do a web search and get results as a
service instead of using a UI via SearchManager.  Your help will be greatly
appreciated.

regards
sunny.

--

3. Android market developer fee - annual or forever?

4. window27

5. Build Log Errors In Ubuntu 9.10

6. Splitting the homepage screen to two screens

7. htc g1 usb internet reverse tethering