Please refer to the audio Recording sample code at the link below: http://groups.google.com/group/android-developers/files
2008/8/31 code_android_festival_way <[EMAIL PROTECTED]> > > Did you get the Audio recording managed right now? > > I'm getting the same error again after adding all the fields. It would > be pretty nice to have a working example. Because from the docs I > can't decide which fields are required and which are just optional. > > Regards! > > On 28 Aug., 07:16, Reto Meier <[EMAIL PROTECTED]> wrote: > > Hi Justin, > > I've tried explicitly including the display name (and artist and > > album) into the new ContentValue but still end up with exactly the > > same error on the ContentResolver.insert call. > > > > On Aug 27, 10:56 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]> > > wrote: > > > > > > Error: > > > > > > 08-24 19:27:18.675: ERROR/Database(178): Error inserting > title=Content > > > > Creation No.5 date_added=1219598838 _display_name= album_id=2 > > > > title_key= - E C O 1 C O - > > > > K 1 ) O 9 E C C E &„ artist_id=3 using INSERT INTO > > > > audio_meta(title, date_added, _display_name, album_id, title_key, > > > > artist_id) VALUES(?, ?, ?, ?, ?, ?); > > > > > From the error it jumps out at me that you're not setting > > > MediaStore.Audio.Media.DISPLAY_NAME, which seems like its required. > > > Also, are you setting the ALBUM_ID and ARTIST_ID somehow or are they > > > encoded in the URI you're using? > > > > > Cheers, > > > Justin > > > Android Team @ Google > > > > > On Aug 24, 3:20 pm, code_android_festival_way > > > > > <[EMAIL PROTECTED]> wrote: > > > > I've got two questions. > > > > > > 1) > > > > Is there a working example for recording audio with the > MediaRecorder? > > > > At the moment I'm using the following setup but it doesnt work: > > > > > >http://paste.pocoo.org/show/83242/ > > > > > > Error: > > > > > > 08-24 19:27:18.675: ERROR/Database(178): Error inserting > title=Content > > > > Creation No.5 date_added=1219598838 _display_name= album_id=2 > > > > title_key= - E C O 1 C O - > > > > K 1 ) O 9 E C C E &„ artist_id=3 using INSERT INTO > > > > audio_meta(title, date_added, _display_name, album_id, title_key, > > > > artist_id) VALUES(?, ?, ?, ?, ?, ?); > > > > > > I've tried the example provided in the docs (Media API) but that > > > > doesn't work at all. It would be nice if someone could provide a > > > > working example. > > > > > > 2) > > > > Is it normal that the raw data stream returned by onPictureTaken(...) > > > > is null? > > > > > > 3) > > > > > > I'm taking pictures as above mentioned. After that I'm saving the > > > > available jpeg stream into the image ContentProvider which works > fine. > > > > Now I'm leaving my app and try to start the "Pictures" application > > > > from the home screen. And now I get the following error message: > > > > > >http://img.skitch.com/20080824-mrbc7yuhfh7an5ynndj9hm6twp.jpg > > > > > > Here is the error from the logs: > > > > > > 08-25 00:15:34.007: ERROR/AndroidRuntime(220): > > > > java.lang.RuntimeException: Unable to resume activity > > > > {com.android.camera/com.android.camera.GalleryPicker}: > > > > java.lang.NullPointerException > > > > > > I can savely say that I'm calling camera.stopPreview() and > > > > camera.release() so there shouldn't be a problem with the camera. > What > > > > else could be wrong? > > > > > > Here is the part where I'm saving my jpeg byte[] into the > > > > ContentProvider: > > > > > >http://paste.pocoo.org/show/83246/ > > > > > > Regards! > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---