[android-developers] Re: Camera preview center crop without SurfaceTexture

2014-06-04 Thread Sam Duke
Note to others: the solution was to use a textureview (android 14+) On Friday, 25 April 2014 17:57:11 UTC+1, Sam Duke wrote: Im trying to show a camera preview to the user of arbitrary size. What I'd like to do is pick an appropriate camera size based on the size of the preview, then

[android-developers] Re: Camera preview freezes when I press HOME button

2013-07-28 Thread Piren
haven't come across this issue myself but using Sleep is not the way to solve anything... I'd suggest you go the other route - When taking a picture put up a timer of the length it takes the slowest device to process the picture (let say, 3 seconds). If home is pressed in that time frame, do

[android-developers] Re: camera preview formats and sizes

2012-05-28 Thread Alex Cohn
I have not seen single Android device to support rgb preview format. On the other hand, what is the scenario that you cannot convert the yuv preview frames to rgb? Sincerely, Alex On Monday, May 21, 2012 2:41:48 AM UTC+3, Marco wrote: hello, i would need to process camera preview frames of

[android-developers] Re: camera preview formats and sizes

2012-05-28 Thread Alex Cohn
Actually, I found a post http://code.google.com/p/zxing/issues/detail?id=343 that mentions that at least some Sciphone devices support the RGB565 format. Unfortunately, I can derive from this discussion that these devices cannot be trusted. BR, Alex On Monday, May 28, 2012 9:19:30 AM UTC+3,

[android-developers] Re: Camera preview Api

2011-02-15 Thread Joe McCann
I recommend using getExternalStorageDirectory() http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory() On Feb 15, 3:10 am, Jayanthi jaia...@gmail.com wrote: Hi,    I am trying to save images in sd card which is taken from camera in emulator, the

[android-developers] Re: Camera preview Api

2011-02-15 Thread Mike C
Jayanthi, I'm not exactly sure why you would get that error, but check these two things: (1) Declare in AndroidManifest.xml that your app uses the WRITE_EXTERNAL_STORAGE permission (2) Check that your SD card is mounted on the device when you try to write the file; for example, if your device is

[android-developers] Re: Camera preview Api

2011-02-15 Thread Jayanthi
Hi, My application is working just small mistake leads to error , In manifest file I gave permission inside another permission like below uses-permission android:name=android.permission.SEND_SMS uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE / /uses-permission I

Re: [android-developers] Re: Camera preview demo

2011-02-14 Thread Kevin Duffey
Make sure you aren't hard-coding /sdcard and using the api to get the right path. I forget the call (someone will post it), or search in this forum for camera and you'll find it. I've seen a few posts about using /sdcard directly and not the right way to do it. What I want to learn is how to

[android-developers] Re: Camera preview demo

2011-02-13 Thread Jayanthi
Hi, uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.autofocus / uses-permission android:name=android.permission.CAMERA / uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE / I gave all the above permission On Feb 14,

[android-developers] Re: Camera preview issue on SDK 2.3 emulator?

2011-01-24 Thread abukustfan
Hi, I also met the same problem. Did you find the solutions?? Thanks On Dec 8 2010, 6:14 pm, blindfold seeingwithso...@gmail.com wrote: Am I really the only one with this problem? Even the built-in camera app gives me only a blank screen in the SDK 2.3 emulator, but after taking a snapshot I

[android-developers] Re: Camera preview issue on SDK 2.3 emulator?

2011-01-24 Thread blindfold
No I haven't found any solution. Please add your observation to http://code.google.com/p/android/issues/detail?id=13133 such that it becomes apparent to Google that it is something in need of fixing and not a unique developer problem. Thanks! On Jan 24, 10:38 am, abukustfan abukust...@gmail.com

Re: [android-developers] Re: Camera preview not restarting after picture taken

2010-12-25 Thread Mark Murphy
On Fri, Dec 24, 2010 at 3:18 AM, Stephen Lebed srle...@gmail.com wrote: I've looked at your code, thanks for the link.  In my app I'm using the new addcallbackwithbuffer and setpreviewcallbackwithbuffer methods. I'm using them to capture preview frames and process them.  I think there may be

[android-developers] Re: Camera preview not restarting after picture taken

2010-12-24 Thread Stephen Lebed
Hi Mark, I've looked at your code, thanks for the link. In my app I'm using the new addcallbackwithbuffer and setpreviewcallbackwithbuffer methods. I'm using them to capture preview frames and process them. I think there may be a bug because the camera take picture routine is stalling. I

[android-developers] Re: Camera preview issue on SDK 2.3 emulator?

2010-12-08 Thread blindfold
Am I really the only one with this problem? Even the built-in camera app gives me only a blank screen in the SDK 2.3 emulator, but after taking a snapshot I do get a picture of the familiar green Android in the Gallery. Thanks On Dec 7, 12:27 pm, blindfold seeingwithso...@gmail.com wrote: Just

[android-developers] Re: Camera preview issue on SDK 2.3 emulator?

2010-12-07 Thread blindfold
Just found that the CameraPreview sample that comes bundled with SDK 2.3 compiles fine but also gives me a plain white preview screen in the SDK 2.3 emulator on Windows 7 64-bit, so apparently it is not (just) my app not playing by the new rules. Any ideas? Gingerbread hardware acceleration acting

Re: [android-developers] Re: Camera Preview not working on my G2

2010-10-21 Thread TreKing
On Wed, Oct 20, 2010 at 11:27 PM, Stephen Lebed srle...@gmail.com wrote: 1) The logcat says Runtime exception: Cannot instantiate activity ComponentInfo. I'm not sure what that is supposed to mean. Maybe you could shed some insight on this. Is there any more to the log cat? Post the 5 - 10

[android-developers] Re: Camera Preview not working on my G2

2010-10-20 Thread Stephen Lebed
Hi TreKing, Two things 1) The logcat says Runtime exception: Cannot instantiate activity ComponentInfo. I'm not sure what that is supposed to mean. Maybe you could shed some insight on this. 2) How does someone change the discussion subject? I can't believe someone get comes in and hijacks my

Re: [android-developers] Re: Camera Preview Zoom in Android

2010-09-21 Thread nagaraj attimani
can you explain..whcih device are you using to test this ? are you working on your own platform.. On Thu, Sep 16, 2010 at 9:10 PM, uday uday.pic...@gmail.com wrote: In Android i think they have already implemented this.. because with out implementing this in android HAL how they will provide

[android-developers] Re: Camera Preview Zoom in Android

2010-09-16 Thread uday
In Android i think they have already implemented this.. because with out implementing this in android HAL how they will provide this API?? Is there any chance that this type of implementation is device specific?? On Sep 7, 10:32 am, nagaraj attimani nagaraj.attim...@gmail.com wrote: Please

[android-developers] Re: Camera preview runs dark on Motorola i1

2010-09-08 Thread blindfold
Unless it is you under another alias, there is a similar report at http://www.satelliteguys.us/dishpointer-com-official-support-forum/223914-screen-darkens-motorola-i1.html Regards On Sep 8, 9:47 pm, Mike Reed waterrock...@gmail.com wrote: Anyone have any experience with this? The barcode

[android-developers] Re: Camera preview runs dark on Motorola i1

2010-09-08 Thread Mike Reed
Nope, but I did hit that thread while searching. I have started a similar thread in the Moto Support forums as well though. I'm developing and need the camera preview to work on this phone. I figured since it was impacting mainstream apps, some non-developer solutions might exist. No responses in

[android-developers] Re: Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-10 Thread blindfold
I have no experience with Samsung, but did you try uncommenting all of p.set(ORIENTATION, PORTRAIT); p.set(ROTATION, 90); p.setPreviewSize(s.width,s.height); to see what happens? Anybody experiencing such issue on the Samsung Galaxy S as well? -- You received this message because you are

[android-developers] Re: Camera preview - strange on Samsung Galaxy S (2.1update1)

2010-07-10 Thread Mathias Lin
@Dan: version is [ro.build.fingerprint]: [Samsung/GT-I9000/GT-I9000/GT-I9000:2.1- update1/ECLAIR/I9000XXJF3:user/release-keys] @blindfold: yes, after commenting out the parameter p.set(ROTATION, 90) it looks ok now, thanks. I just need to rotate the image afterwards manually then, since it's in

Re: [android-developers] Re: Camera preview - works on all devices apart from the Droid

2010-06-22 Thread Tom Gibara
I *think* this is caused by the Droid/Milestone not liking the default previewFrameRate that Android sets. Try setting that to one of the values specified by getSupportedPreviewFrameRates(). -- Tom Gibara email: m...@tomgibara.com web: http://www.tomgibara.com blog: http://blog.tomgibara.com

[android-developers] Re: Camera preview - works on all devices apart from the Droid

2010-06-21 Thread Peter Sankauskas
I have the exact same issue - did you ever solve it? Peter On May 25, 1:39 am, mscwd01 mscw...@gmail.com wrote: Surely I cant be the only one to encounter problems with this? On May 24, 6:19 pm, mscwd01 mscw...@gmail.com wrote: Hey, This is my code I use to display a preview from

[android-developers] Re: Camera preview - works on all devices apart from the Droid

2010-05-25 Thread mscwd01
Surely I cant be the only one to encounter problems with this? On May 24, 6:19 pm, mscwd01 mscw...@gmail.com wrote: Hey, This is my code I use to display a preview from the camera on a SurfaceView: public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {        

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-09 Thread Greg
Hmm... so I need a way to keep the thread running, and update its data load from onPreview. Is there anything specific to watch out for, or do I just need to be more well versed in threads? (ie. Should I be looking at Thread.setDaemon() in particular?) As for the SurfaceView issue, how else could

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-09 Thread Greg
Sorry if this arrives out of order (ie. my response is responded to before this is posted). I'm a new user, so my posts are still being moderated before being posted. But anywho, I've updated my code to be more Thread friendly. http://paste.weezy.us/p/565 the Thread specific is towards the

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-09 Thread Streets Of Boston
If you don't know much about thread syncing, take a look at the java.util.concurrent package, especially the ExecutorService and the Future instances it can create. The ExecutorService allows you to create one (or more) thread and submit tasks for it. These threads will keep running until you

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-08 Thread Streets Of Boston
You're right, rollback... i didn't even notice that. Although the threads are a one-shot processing and end immediately after that, the system may start to choke on the sheer multitude of them, especially if the decoding is a bit slow. Greg, create only one thread and pause and resume the

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-07 Thread Streets Of Boston
How fast is 'decodeYUV' method? You call this method while your canvas is locked. If 'decodeYUV' is slow, it not only makes your background thread sluggish, but your main GUI-thread as well, because the canvas is locked for too long. Also, you don't synchronize on '_data'... Your implementation

[android-developers] Re: Camera Preview Filter Choppiness

2009-12-07 Thread rollbak
That's right, and also you are spawning new threads in every preview frame. And last but not least, i don't think having two surfaceview stacked is a good solution, at least is not intended for using it that way. On Dec 7, 2:10 pm, Streets Of Boston flyingdutc...@gmail.com wrote: How fast is

[android-developers] Re: Camera preview

2009-08-31 Thread tinyang
Thank you Bill for your response! This has been confounding me for a while and I've had no idea how to remedy it. Is it possible for you to please include a code sample or a link to a code sample? On Aug 28, 8:45 am, Bill wrobb...@gmail.com wrote: There seems to be a bug in the EXTRA_OPTIONS

[android-developers] Re: Camera preview

2009-08-28 Thread Pavel
Hey tinyang, Could you please share the code you use for picture taking? I am working on the same thing and having weird issues with it - it does not take full sized pictures for unknown reason... And yeah, sorry, no answer to your question from my side at the moment. Pavlo On Thu, Aug 27,

[android-developers] Re: Camera preview

2009-08-28 Thread tinyang
Hi Pavel, and thanks for the reply. I'm happy to share the snippet of code I have for picture taking, but I have not tried it out yet because in order to see and use the picture-taking button in my activity view, I need to get the camera preview in the correct place first. I still really need

[android-developers] Re: Camera preview

2009-08-28 Thread Bill
There seems to be a bug in the EXTRA_OPTIONS if you're using the default camera activity. That is why you are not getting full sized pictures. If you want to embed the preview you can use the Camera object directly. On Aug 28, 1:02 am, Pavel pavli...@gmail.com wrote: Hey tinyang, Could you

[android-developers] Re: Camera preview on an OpenGL surface....

2009-07-15 Thread Richard Schilling
I solved this, thanks in part to http://groups.google.com/group/android-beginners/browse_thread/thread/489e56ea2a1d42a9/994eb23731f60650?lnk=gstq=OpenGL+View+on+top+of+Camera#994eb23731f60650 Follow the instructions on that thread. Here's the general strategy: 1. In your main activity, set as

[android-developers] Re: Camera preview different from captured image

2009-06-17 Thread joexner
I noticed this too, and it's pretty much stalled the development of my app. The flakiness of the Camera API is disquieting. I mean, how are we to know that whatever workaround we put into our apps for the G1/G2 will work for future phones? --~--~-~--~~~---~--~~

[android-developers] Re: Camera Preview 90 degree rotated

2009-06-09 Thread Bishwa
Forcing the activity to run in landscape is not what I want. I want the camera to run on portrait mode and landscape mode depending upon orientation sensor. Is it the only way left out? On Jun 8, 9:19 pm, Mark Murphy mmur...@commonsware.com wrote: Bishwanath Singh wrote: I am really bugged up

[android-developers] Re: Camera Preview 90 degree rotated

2009-06-08 Thread Mark Murphy
Bishwanath Singh wrote: I am really bugged up with this issue. Please help.When camera is launched in portrait mode, the viewfinder screen is 90 degrees rotated and stretched out. I read couple of places that this is a known bug with sdk1 but i am still finding this problem with cupcake.

[android-developers] Re: Camera preview callback and garbage collector

2009-05-27 Thread karan parikh
I dunno if there is a way to rectify that in the android framework. If possible we can change the code in the framework to suit our requirements. My belief is there should be one. We might have to hack somewhere. On Mon, May 25, 2009 at 6:11 PM, Bo wang.b.fr...@gmail.com wrote: It seems that,

[android-developers] Re: Camera preview different from captured image

2009-04-22 Thread Jon Webb
More research showed that the last image supplied through preview when capture is occurring is a reduced-size version of the still image. This has a different field of view from the preview image, but it is possible to compensate by adjusting the position of the viewfinder at that point. I

[android-developers] Re: Camera preview in ScrollView | Camera SurfaceView in XML layout

2009-03-11 Thread Dave Sparks
I don't know of anyone who has tested a video or camera preview surface on a ScrollView. I suspect that it won't work on a G1. There is a known issue using either of these on a TabView. I derived my own CameraView widget from SurfaceView and placed it in an XML layout. Works just fine. On Mar

[android-developers] Re: Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-21 Thread chrispix
Any suggestions? I have made my camera surface preview an activity. While it is set inside a tab (portrait) it does not matter if i set the surfacepreview activity in the manifest as portrait or landscape, it is always set to landscape. I can't have my application turn all the tabs into

[android-developers] Re: Camera preview to an invisible SurfaceView

2008-12-20 Thread blindfold
The problem possibly caused by using GLSurfaceView (from the API Demos) as a preview surface. Is it possible to avoid that? Don't know, I use a SurfaceView but no OpenGL, so maybe the hardware acceleration and buffers on the G1 make the difference when using OpenGL. I have no experience with

[android-developers] Re: Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-20 Thread blindfold
It is a known G1 bug. See also http://groups.google.com/group/android-developers/browse_thread/thread/601862b9f379e944/ A workaround is to design your app for landscape mode and force it to always run in that mode, for instance by using android:screenOrientation=landscape in the manifest. It is

[android-developers] Re: Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-20 Thread blindfold
Actually I am baffled to find that when I tried the built-in camera app again this morning, it's preview had the *correct* orientation, no matter whether the keyboard was slid out or not and indiscriminate of in what physical orientation I started the camera app. I'm absolutely certain that I

[android-developers] Re: Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-20 Thread chrispix
Thank you very much for the info. I will read up on that. I thought I had seen something as a G1 bug. I guess zxing forced landscape mode? I guess that would explain their text rotated vs the surface.. Thanks again! Chris. On Dec 21, 12:17 am, blindfold seeingwithso...@gmail.com wrote: It is

[android-developers] Re: Camera Preview is rotated 90. (auto rotates unless keyboard is out)

2008-12-20 Thread chrispix
Ok, Cool, i tried that, and it appeared to work fine.. Now my issue is that I need to move my camera preview to it's own activity b/c I am displaying it on a tab :/ Chris. n Dec 21, 12:17 am, blindfold seeingwithso...@gmail.com wrote: It is a known G1 bug. See

[android-developers] Re: Camera preview to an invisible SurfaceView

2008-12-19 Thread Mark K
I don't think this is possible. Doesn't seem like Android supports 'headless' graphics implementations. Mark On Dec 19, 7:35 am, Boshik bos...@gmail.com wrote: Hi Guys, Is it possible to capture camera snapshots to bitmaps WITHOUT creating a visible surface view?

[android-developers] Re: Camera preview to an invisible SurfaceView

2008-12-19 Thread blindfold
Is it possible to capture camera snapshots to bitmaps WITHOUT creating a visible surface view? All samples I saw over internet uses camera preview directly to a surface view and the surface view underneath must be visible. Just do not use setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS) and

[android-developers] Re: Camera preview after long delay, progress window

2008-11-19 Thread Alvin Yates
If you make the Camera its own Activity and set it to call after the progress window terminates, then you shouldn't have a problem. If you're trying to do it all in one Activity, you might have an issue. The Camera API is very loose when it comes to timing constraints as it appears (without

[android-developers] Re: Camera preview after long delay, progress window

2008-11-19 Thread Jon Webb
That fixed the problem. I ran the initialization in a separate Activity, and start the camera preview in an Activity which is started after the initialization was done. I wrote a test app to verify the problem, BTW. If I start the camera preview after a delay of 50 ms or more it fails with a

[android-developers] Re: Camera preview after long delay, progress window

2008-11-19 Thread blindfold
Related to issue 894? On Nov 19, 6:49 pm, Jon Webb [EMAIL PROTECTED] wrote: That fixed the problem. I ran the initialization in a separate Activity, and start the camera preview in an Activity which is started after the initialization was done. I wrote a test app to verify the problem, BTW.

[android-developers] Re: Camera preview on G1 only works in landscape ?

2008-11-06 Thread jarkman
On Nov 5, 10:30 pm, apkdev [EMAIL PROTECTED] wrote:  As a last resort, I'm going to download the android source and peek in to the built-in Camera app's source (assuming it's in there). Thanks for the confirmation, anyway. And good luck in the source code. I'd be very interested to hear

[android-developers] Re: Camera preview on G1 only works in landscape ?

2008-11-06 Thread blindfold
Thank you all for this umptieth discovery of a G1 camera showstopper! Good to see that it has been reported as issue 1193 http://code.google.com/p/android/issues/detail?id=1193 I'm afraid you will not find much in the published Android source since the G1-specific camera code is not included

[android-developers] Re: Camera preview on G1 only works in landscape ?

2008-11-06 Thread blindfold
Update: it seems that about ten hours ago action was taken to publish/ patch the T-Mobile G1 (dream) specific camera code. See http://review.source.android.com/1776/patch/1/za6d1c35c38b78a114315a8b9da9364a39de6adba for libcamera/QualcommCameraHardware.cpp, libcamera/ QualcommCameraHardware.h,

[android-developers] Re: Camera Preview onto SurfaceView using xml

2008-07-08 Thread code_android_festival_way
I'm interested as well how that could work. I'm also looking for a way to use the Preview app inside my application but don't know how to use it inside my XML file. On 6 Jul., 18:22, Bobalot [EMAIL PROTECTED] wrote: hi, im trying to make a simple camera app, by extending the CameraPreview