How To Implement Camera Zoom Controls In Preview Class
Dec 3, 2012I am trying to implement zoomin and zoomout in my preview class.. It does not give any error but the zoom controls don't work.
View 1 RepliesI am trying to implement zoomin and zoomout in my preview class.. It does not give any error but the zoom controls don't work.
View 1 RepliesI've a problem with Camera Preview Zoom. The methods present in Android 2.2, setZoom() is not working to zoom the preview. Is there any another way to do the Zoom in android? I am using the code present in the Android API Demos. Is their any body who has worked on implementing ZoomIn & ZoomOut and got succeed??
View 4 Replies View Relatedi add a zoomcontrols in my view, not in the webview or mapview, but when i click the zoom in/out, the view can't in/out?
View 2 Replies View RelatedI wish to do the Image Switcher's Touch Event. That is when i touch it, it should wake up the zoom controls. After zoomed in, the image can able the touch scroll on the image up and down. how to do it? Is there any default zoom controls? If not, tell me your suggestion, idea and also valuable links about this? make a note the Target version is android 1.6.
View 1 Replies View RelatedIs there a way to always show the zoom controls on a MapView? I have added the zoom controls using code...
]
but the zoom controls fade in and out. I want them to always be visible.
I have to scroll the webview content vertically with in scrollview surrounded tag ,in the sense that webview hided initially and when touch event occured the webview contained have to visible the scroll control in both directions but its not scrolling vertically,anybody help me to solve it...
here xml code...
I am new to android,i need to zoom an selected imageview given statically in array defined in my code how can i get it.
View 1 Replies View RelatedI want to zoom text that is displayed at center of screen as per user choice. How can I achieve this ? Using pinch multitouch cannot be tested on emulator and I want something that I can test on Android emulator.
Can I use zoom in and out controls to control only text view for my layout ?Or Can I use webview to contain a text as webview has default zoom in out buttons ?
My problem is that the zoom controls don't appear on the mapview after one click, i.e the first click after the application loads. (I am using the deprecated version.)
In my application, on a click I position a pushpin on the touched location and also generate a toast with the co-ordinates. After I click the map, the pin is re-loacated and the toast are generated (albeit a bit late, I guess because of the time for which they have to say on screen)
What is happening wrong? What gives? Are the two activities (pin and toast) stealing the touch event?
I have developed a google map app and the zoom controls will not appear automatically and will disappear after they are used.So I want to see the zoom controls (_ , +) to appear with the map permanently.
View 1 Replies View RelatedLooking to replicate a function that the iphone has on my android phone (VZW Droid). When you move your finger over a word or sentence, a bubble appears zoomed in showing where the cursor will land wen you lift your finger. Anyone know an app or a way to duplicate this function? Thanks!
View 1 Replies View RelatedI built a ListActivity and now I want to add Map Previews as the List Icons. I dont want to extend MapView because: 1st I just need a little static preview and 2nd I already extended to ListView.I already looked into using the static map api, however that also doesnt look quite good in that small dimensions:
View 1 Replies View RelatedI can use the built in zoom controls for WebView or MapView. But don't know how to access the control for View or ImageView. If the control is not implemented, can we access the bitmaps for the zoom control supporting WebView or MapView.
View 6 Replies View RelatedDoes anyone know if there's a camera app that has "on screen controls" for settings. Specifically i'd like to be able to toggle the flash without having to go back into settings all the time. Just a little flash on/off toggle on the screen, it's such a simple thing, would make life easier but none of the camera apps I've tried have it.
View 6 Replies View RelatedI'm trying to get the camera preview running on my G2.
This is the code I'm testing with, which was taken from the sample code. It is using supplemental code supplied by Wu-Cheng, but its still throwing an error.
CODE:......................
I have a problem with using the camera of an Android 2.1 phone (HTC Desire), maybe you can help me.
After calling camera.open() DDMS in Eclipse shows the following errors:
CODE:............
Test view in the emulator works fine, but on my phone only a popup is shown where I only can close the application.
I upgraded to the 2.0 SDK yesterday. Don't know if that has anything to do with it. I can't get the Camera Preview example from the API Demos to work. I get the same error in both my emulator and on my G1:
E/AndroidRuntime( 4758): java.lang.RuntimeException: Fail to connect to camera service.
Is it possible to capture an image without showing the camera preview?, i have a requirement that i should be able to capture the image from a thread or from a service, without disturbing the foreground application, where i do not want to show the camera preview, but still i want to capture the image in background and store it in the device. So is it possible to do using the Android 2.2 SDK version?
View 3 Replies View RelatedAnybody know about the camera Api in android.when i used this Api it displayed a black and white grids and a squre moving above it.Anyone know how to get a real time camera preview please help me with some code.
View 2 Replies View RelatedI have a requirement to Capture the image without showing the Preview.. And i want to do it in the Background as a Service. Is it possible to do that?
View 2 Replies View RelatedI see a couple of threads on this topic, but none of them seem to answer the question, so, I'm giving it another go...
Very simple idea... I want to some portion of the screen to preview (and shoot) the camera and the other portions of the screen to add my own graphical elements (buttons, colorful frame around the camera preview, etc).
The example that comes with Android fills the screen. The obvious solution (that doesn't seem to be working) is to use my own SurfaceView (rather than the one they do in the example) and have it sitting in my XML. The code (beneath) doesn't crash and reports that it's firing up the camera... it just never renders on the screen.
I have no idea what I'm doing incorrectly. My guess is that it has something to do with the display thread never having the urge to redraw anything after it renders the initial screen, but I even tried adding a button and initiating the camera to render on the surface view upon button click, but that has not provoked it any further.
(most of this code is pulled directly out of the Android sample code, so, I'm sure it's correct. I'm just doing something wrong in how I pull my View in after the fact, I think).
CODE:........................
In my Application the camera preview is working properly in both in portrait and in landscape mode. No crashes are occurring, but the users are complaining that the crashes are occurring when they are using the same.
View 1 Replies View RelatedLet's say in my example I am working with SurfaceView for my CameraSurfaceView. I have a few questions, hope you can help me.
1. When this SurfaceView gets created (I assume via final CameraSurfaceView cameraView = new CameraSurfaceView (getApplicationContext()), this will result in a call createSurface() in SurfaceFlinger with format, width and height. Am I correct?
Is this SurfaceView also my UI window if I want to draw anything? I thought if I call setType(PUSH_BUFFER) on this surface, I won't be able to do any drawing on this surface.
2. How does the application pass these information like format, width and height to SurfaceFlinger for the allocation? Is it by using .setFormat, .setFixedSize?
3. How do they methods .setFormat, .setFixedSize related to the surfaceHolder.surfaceChanged() callback?
So I started with this little write-up. I wanted to try to make an application that will take pictures while running in the background. To start though I wanted an application that once opened would simply take a picture every X seconds. After recreating the classes and methods show in the walk through below I ran into a few problems.
http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidCamera101.pdf
For starters its seems that the onCreate function sets up all the objects for the application, but if you try to take a picture through any other method than onClick (IE directly calling it) the application actually hasn't setup the canvas or the preview yet.
My first question:
Is there any conditional method that you can setup that will wait till all the "onCreate" objects are created and their associated methods are called and finished? How do I wait for the application to finish putting together my surface and starting the cameras preview before automatically starting to take pictures?
My second question:
I am required to have a preview available to take pictures. Is there anyway to push this application to the back (IE running in the background) while still taking pictures? Is drawing to a canvas a requirement? (From what I can tell AFAIK, you are required to have a surfaceholder to start preview, when you put up another screen or application that pauses the current application and closes the surface/canvas you were presenting that preview on). If my understanding is correct on all of this the best I will be able to do is make a 1x1 pixel canvas that will still take up the screen due to the application being in the foreground.
My Third question:
Is there any way around this? Can you still utilize the camera in some fashion without requiring the preview be drawn?
I have yet to try this on an actual device, but expect similar results. Anyway, long story short, whenever I run my app on the emulator, it crashes due to an out of memory exception.
My code really is essentially the same as the camera preview API demo from google, which runs perfectly fine.
The only file in the app (that I created/use) is as below-
CODE:.......
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. Has anyone having any idea is this issue is fixed in cupcake or in donut? any clues how to move ahead. setOrientation and changing the preview size didn't help. Even I read somewhere Surface flinger class needs change: http://groups.google.com/group/android-framework/browse_thread/thread...
View 3 Replies View RelatedI am using the code from ApiDemo Camera Preview and it runs fine on my Gphone but the preview is rotated and stretched.
View 8 Replies View RelatedDoes someone know how I can overlay an image over the camera preview?
View 6 Replies View RelatedI am writing an android 1.5 application which starts just after boot-up. This is a service and should take a picture without preview. This app will log the light density in some areas whatever. I was able to take a picture but the picture was black.
After googling like crazy, i came across a bug thread about it. If you don't generate a preview, the image will be black since android camera needs preview to setup exposure and focus. I've created a surfaceview and listener but the onSurfaceCreated event never gets fired.
I guess the reason is, the surface is not being created visually. I've also seen some examples of calling the camera statically with MediaStore.CAPTURE_OR_SOMETHING which takes a picture and saves in the desired folder with two lines of code but it doesn't take a picture too.
Do i need to use ipc and bindservice to call this function or do you have any suggestion to achieve my goal (taking a picture without preview) and if so, would you give me a small piece of code as example?
I'm trying the camera preview
This is my code and it doesn't throw any error, but the screen still black, any ideas?
this.setContentView(R.layout.camerapreview);
SurfaceView cameraSurface = (SurfaceView)findViewById(R.id.cpPreview);
SurfaceHolder holder = cameraSurface.getHolder();
holder.addCallback(this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
this.camera = Camera.open();
this.camera.setPreviewDisplay(holder);
this.camera.startPreview();}