Thanks for your answer Justin. Sorry for overloading that topic. Next time I will open different topics.
2) I'm doing an actual test. (not refering to 3) ) Here is an example of what I do: http://paste.pocoo.org/show/83355/ (just a shortened version of the actual code) This is working for jpeg data stream but not for the raw data stream. (the incoming raw byte[] is always null) 3) Thanks for that. I will include the BUCKET_ID. --- Should I open a unique topic for the first problem in order to keep it well arranged? Regards! On 26 Aug., 02:19, "Justin (Google Employee)" <[EMAIL PROTECTED]> wrote: > In the future, please only include one topic per new post/thread. It > gets very confusing to handle posts like this that have multiple > question in vastly different areas of the platform. > > (2) - no, the returned data stream should not be null. Are you doing > an actual null test or just assuming it to be based on the null > pointer error you're getitng in (3)? > > (3) - The issue appears to be that in your ContentValue bundle you're > not including a value for MediatStore.Images.Media.BUCKET_ID. This > isn't very well documented and I'm not even sure what BUCKET_ID is > using it for, but in my testing, specifying an arbitrary value for it > eliminates the NPE in Pictures. I'll also note that somewhat counter- > intuitively MediaStore.Images.Media.TITLE is the "name" of the image > in Pictures. I've posted source > athttp://groups.google.com/group/android-developers/web/CameraApiTest.zip > , which is an extension of code that Megha provided before. > > 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 -~----------~----~----~----~------~----~------~--~---