Is it possible camera app without using preview layout? - java

I am developing an app which takes picture in background.
but it uses a preview layout which is attached to an activity.
actually i need it as plugin which do not show preview. and camera app i have developed using class which extends an activity.
i wonder how can it be possible to make it without using an activity or preview layout.
please help on this matter.

You can hide the preview layout.
layoutname.setVisibility(View.GONE);

Related

Recycler view add image from gallery or camera with button

I am working on an app where I have to upload images to a recycler view from either the gallery or from camera. The recycler view should have a button where I can add the image from.
The image below shows what I am trying to achieve.
My question is, is there a library for android either java or kotlin that can help me achieve this?
Any help will be highly appreciated.
You can use UltimateRecyclerView library for your purpose
This library supports different layouts and many more other useful features. You can create different layouts for images and plus button and define different code logic by checking the position of the clicked item.

make android torch app without main activity(open torch on first click)

I have made a torch/Flashlight app on android studio (which is working perfectly fine), what i want is to open the flash light just by clicking the app button (without opening the app). can anyone upload the source code.
Please be clear and thorough.
you can use transparent theme for the MainActivity and when activity start, turn on flash light and finish the activity! and nothing was showed to user!
you can use this link transparent theme to know how define transparent theme.
I think it isn't possible to enable flashlight by only clicking the app icon because app icon always refers to an activity.
But you can make a widget. It's well described on:
http://www.vogella.com/tutorials/AndroidWidgets/article.html

How to add overlay on the Camera using ZBAR in Android

I need help, I am using ZBAR for bar code scanning for the Android App. I want to add a overlay on the camera view so that I can display some information and get user input using button
You can do that with the help of SurfaceView For More Info U Can Check This Click

Using the camera inside an Android app

I want to create an Android app which uses a camera, but I don't want the app to redirect to the default camera app on the device.
I want a custom-made camera app specifically for the app. How do I implement it?
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.
Look into this tutorial http://www.airpair.com/android/android-camera-surface-view-fragment
Link 2
you can use SurfaceView Fragment.
I used https://github.com/commonsguy/cwac-camera to get custom camera done.
The library #commonsware made, great library with great documentation and support.

Overlay VideoView but keep touch focus on underlying activities in Android

I'm trying to create an app that will display a video in a VideoView in a transparent activity but keep the touch focus on any underlying activity. For example, if I have one app opened and my app is launched, the video will show but the user can still interact with the app they were previously viewing. I have the transparent activity and video working but I can not find a way to keep interaction in the activity under mine. Please tell me if this is possible and how to do it. Thanks
Matt
Set WindowManager.FLAG_NOT_TOUCH_MODAL for your transparent VideoView Activity Window.
By doing this, it will by-pass the touch events on the area outside of your activity to the previous activity.

Categories