All Projects → florent37 → Camerafragment

florent37 / Camerafragment

Licence: other
A simple easy-to-integrate Camera Fragment for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Camerafragment

Android Camera2 Secret Picture Taker
Take pictures 📷 secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (-88.11%)
Mutual labels:  camera, photos, capture
Agimagecontrols
cool tools for image edition
Stars: ✭ 217 (-90.61%)
Mutual labels:  camera, photos, capture
Gncam
📷 A Swift 3 library for interacting with the camera on iOS using AVFoundation
Stars: ✭ 42 (-98.18%)
Mutual labels:  camera, photos
Spectaculum
A spectacular view widget for visual media content on Android
Stars: ✭ 78 (-96.63%)
Mutual labels:  camera, photos
Pictureselectorlight
Picture Selector Library for Android or 图片选择器
Stars: ✭ 145 (-93.73%)
Mutual labels:  camera, photos
Paparazzo
Custom iOS camera and photo picker with editing capabilities
Stars: ✭ 714 (-69.12%)
Mutual labels:  camera, photos
Media picker
A Flutter Plugin for Selecting and Taking New Photos and Videos.
Stars: ✭ 24 (-98.96%)
Mutual labels:  camera, photos
Albumcamerarecorder
一个高效的多媒体支持操作库,可多方面的简单配置操作相册、拍照、录制、录音等功能。也支持配套使用的展示图片、视频、音频的九宫格功能。 (An efficient multimedia support operation library, can be a variety of simple configuration operation album, photo, recording, recording and other functions.Also support supporting the use of the display of pictures, video, audio of the nine grid function.)
Stars: ✭ 106 (-95.42%)
Mutual labels:  camera, capture
React Native Vision Camera
📸 The Camera library that sees the vision.
Stars: ✭ 443 (-80.84%)
Mutual labels:  api, camera
Pbjvision
📸 iOS Media Capture – features touch-to-record video, slow motion, and photography
Stars: ✭ 1,940 (-16.09%)
Mutual labels:  camera, capture
Nextlevel
NextLevel was initally a weekend project that has now grown into a open community of camera platform enthusists. The software provides foundational components for managing media recording, camera interface customization, gestural interaction customization, and image streaming on iOS. The same capabilities can also be found in apps such as Snapchat, Instagram, and Vine.
Stars: ✭ 1,940 (-16.09%)
Mutual labels:  camera, capture
Pynet Pytorch
Generating RGB photos from RAW image files with PyNET (PyTorch)
Stars: ✭ 169 (-92.69%)
Mutual labels:  camera, photos
Cameraengine
🐒📷 Camera engine for iOS, written in Swift, above AVFoundation. 🐒
Stars: ✭ 554 (-76.04%)
Mutual labels:  camera, capture
Simple Camera
Quick photo and video camera with a flash, customizable resolution and no ads.
Stars: ✭ 503 (-78.24%)
Mutual labels:  camera, photos
Camera calibration api
A simple Python API for single camera calibration using opencv
Stars: ✭ 36 (-98.44%)
Mutual labels:  api, camera
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (-79.8%)
Mutual labels:  camera, photos
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (-95.5%)
Mutual labels:  api, photos
Alcameraviewcontroller
A camera view controller with custom image picker and image cropping.
Stars: ✭ 2,023 (-12.5%)
Mutual labels:  camera, photos
Magicalcamera
A library to take picture easy, transform your data in different format and save photos in your device
Stars: ✭ 327 (-85.86%)
Mutual labels:  camera, photos
Multiimagepicker
A library to pick multi images in Android
Stars: ✭ 391 (-83.09%)
Mutual labels:  photos, capture

CameraFragment

Android Arsenal CircleCI

A simple easy-to-integrate Camera Fragment for Android

CameraFragment preview directly the camera view, and provides a easy API to capture or manage the device

You can setup your own layout and control the camera using CameraFragment

Android app on Google Play

CameraKit

This library works, but on some devices... errors happens, I don't have time to maintain compatibility with all device A community group was created, they created CameraKit, don't hesitate to try it !

https://github.com/CameraKit/camerakit-android

Setup

png

//you can configure the fragment by the configuration builder
CameraFragment cameraFragment = CameraFragment.newInstance(new Configuration.Builder().build());

getSupportFragmentManager().beginTransaction()
                .replace(R.id.content, cameraFragment, FRAGMENT_TAG)
                .commit();

Actions

You can directly take a photo / video with

cameraFragment.takePhotoOrCaptureVideo(callback);
cameraFragment.takePhotoOrCaptureVideo(callback, directoryPath, fileName);

gif

Flash can be enable / disabled ( AUTO / OFF / ON ) with

cameraFragment.toggleFlashMode();

gif

Camera Type can be modified ( BACK / FRONT ) with

cameraFragment.switchCameraTypeFrontBack();

gif

Camera action ( PHOTO / VIDEO ) can be modified with

cameraFragment.switchActionPhotoVideo();

gif

And you can change the captured photo / video size with

cameraFragment.openSettingDialog();

gif

Listeners

Result

Get back the result of the camera record / photo in the CameraFragmentResultListener

cameraFragment.setResultListener(new CameraFragmentResultListener() {
       @Override
       public void onVideoRecorded(byte[] bytes, String filePath) {
                //called when the video record is finished and saved

                startActivityForResult(PreviewActivity.newIntentVideo(MainActivity.this, filePath));
       }

       @Override
       public void onPhotoTaken(byte[] bytes, String filePath) {
                //called when the photo is taken and saved

                startActivity(PreviewActivity.newIntentPhoto(MainActivity.this, filePath));
       }
});

Camera Listener

cameraFragment.setStateListener(new CameraFragmentStateListener() {

    //when the current displayed camera is the back
    void onCurrentCameraBack();
    //when the current displayed camera is the front
    void onCurrentCameraFront();

    //when the flash is at mode auto
    void onFlashAuto();
    //when the flash is at on
    void onFlashOn();
    //when the flash is off
    void onFlashOff();

    //if the camera is ready to take a photo
    void onCameraSetupForPhoto();
    //if the camera is ready to take a video
    void onCameraSetupForVideo();

    //when the camera state is "ready to record a video"
    void onRecordStateVideoReadyForRecord();
    //when the camera state is "recording a video"
    void onRecordStateVideoInProgress();
    //when the camera state is "ready to take a photo"
    void onRecordStatePhoto();

    //after the rotation of the screen / camera
    void shouldRotateControls(int degrees);

    void onStartVideoRecord(File outputFile);
    void onStopVideoRecord();
});

Text

CameraFragment can ping you with the current record duration with CameraFragmentTextListener

Widgets

CameraFragment comes with some default views

RecordButton, MediaActionSwitchView, FlashSwitchView, CameraSwitchView, CameraSettingsView

png

Download

Buy Me a Coffee at ko-fi.com

In your module Download

implementation 'com.github.florent37:camerafragment:1.0.10'

Community

Forked from https://github.com/memfis19/Annca

This library works, but on some devices... errors happens, I don't have time to maintain compatibility with all device A community group was created, they created CameraKit, don't hesitate to try it !

https://github.com/CameraKit/camerakit-android

Credits

Author: Florent Champigny http://www.florentchampigny.com/

Blog : http://www.tutos-android-france.com/

Fiches Plateau Moto : https://www.fiches-plateau-moto.fr/

Android app on Google Play Follow me on Google+ Follow me on Twitter Follow me on LinkedIn

License

Copyright 2017 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].