Easy way to work with Camera in Android - android

Currently I'm developing an Android app that deals a lot with taking pictures.
I used the native camera with intents before, but now I have to style the camera preview with custom buttons and a custom layout.
I'm looking for a simple view that can display a live camera preview.
Such a view doesn't seem to exist without a lot of overhead. There's a lot of confusion about the surfaceView & TextureView it seems.
I started looking for a decent library, but only found this:
https://github.com/Glamdring/EasyCamera
and so far I can't seem to get this to work, there is no example here either.
How do you guys tackle this? It seems that the common way to work with a camera preview is way to complicated and there are no decent libraries yet?
Please point me in the right direction. :)
Is everybody using the native camera or is everybody in pain? ;-)

Related

How to apply different live effects to android Camera?

I want to develop a Camera 2 kind of application. So i just wanted to know how to apply live effects to android Camera .Is there any android library for that? plz help me to solve the issue.
thanks in advance....
What have you tried? I assume by live effects you mean shown on the preview.
You can try what the answer here suggested, but any sort of complicated filter implemented in java is going to slow things down. For good performance you'll probably have to write some native code to process the previews. The good news is, if you're writing NDK code you can make use of libraries like OpenCV to do the filtering for you.

How do I create a custom camera layout for Android?

I am working on an android app that will require the camera. I know that I can use the built in camera app to take photos. However, I would like to have a more custom look (probably another UI and some extras).
Can someone of you guys give me a general approach on how to achieve that? That would be awesome, thank!
Here is a nice tutorial to accomplish it.
Camera Integration with Surface View
You can make your custom changes on the SurfaceView according to your requirements.

What libraries for interactive 3D model in Android AR app?

I'm asked to do an app with a 3D object mapped on a tag on the camera preview. The user should be able to rotate the 3D object on swipes, and to click on different area of the 3D object.
I'm investigating the different way to do it.
So far the best option I've found seems to be https://developer.vuforia.com/resources/sdk/unity, but I can't find whether it's possible to interact with the 3d model (rotate on swipe, define clickable areas).
Has anyone any experience with that?
I guess I can do it with some OpenGL, but I have no experience with it and it seems quite complex to start off with.
Is there any other library I should consider?
I would use OpenGL and start by the training tutorials on http://developer.android.com/training/graphics/opengl/index.html. Hope this helps! If you follow these tutorials you will be able to do what you want. ive tried unity and it is a really good engine too. and of course you can make an object clickable with unity! maybe using unity would be easier but the documentation on opengl is huge and is not that difficult to implement at least with first steps. hope this helps
The Metaio SDK can do all of that but I am not sure if it automatically provides the area of the model tapped, but you could ask here.

Android carousel OpenGL ES 2.0

I want to create sth like this link using OpenGL ES 2.0. I am still a beginner, and I did the basic tutorials like drawing a square, quad etc. but still don't have a precise idea how i should do this. Should I create GLES20SurfaceView and somehow use it combined with a gallery widget (every item of the gallery would be a view - GLES20SurfaceView) or I should draw everything from scratch. Please, if someone has an experience with similar things and done sth like this, let me know, give some hints, examples, links, everything would be of great help.
Gallery is specific to a horizontal scrolling list, and wouldn't apply here.
You will want one GL surface view for your entire drawable area, not individual ones for each item.
The Carousel youtube item was created using RenderScript for best performance.
You can accomplish similar functionality entirely in Java, although performance may be an issue. I suggest writing it in Java first, then optimizing as needed for your application. Here is an Android OpenGL ES 2.0 tutorial.

Is it possible to use Android's View Animation package (tween/frame) within Live Wallpaper?

Greetings fellow Droidheads and the like. I am working on a Live Wallpaper project that's getting more complex. I am curious: has anyone figured out a way to use Android's View Animation package (http://developer.android.com/guide/topics/graphics/view-animation.html) from within live wallpaper? It doesn't seem obvious to me that this is possible, in that it is a service rather than an activity, and you are given a surfaceholder to lockdown to get a canvas on which to draw--no way to setContentView, etc. The tween package seems to depend on views (i.e. the animation gets associated with the view itself, not the canvas, bitmap, etc.). Any thoughts? Thanks in advance. George
I built a library that let you interpolate and animate any Java object, optimized for Android (without any garbage collection).
Since I'm not here to publicize a product (it's an open source lib, LGPL), I would encourage you to read my answer in this thread:
Android: tween animation of a bitmap
Tell me if it solves your problem :-)
Endeavoring to answer my own question...
No, I do not think this is possible.
I have tried hard, with no success, and I have reviewed many examples of other people's code, and never seen anyone take this approach.
What's more, even if it worked, I now think it wouldn't be a good idea: it's better for live wallpapers to take responsibility for their own drawing, to precisely control timing issues, &c.
George

Categories

Resources