All Projects β†’ memfis19 β†’ Annca

memfis19 / Annca

Licence: mit
Android library to simplify work with camera for video and photo with using different camera apis.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Annca

Android Camera2 Secret Picture Taker
Take pictures πŸ“· secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (+62.72%)
Mutual labels:  camera, photos
Simple Camera
Quick photo and video camera with a flash, customizable resolution and no ads.
Stars: ✭ 503 (+197.63%)
Mutual labels:  camera, photos
Stickercamera
This is an Android application with camera,picture cropping,collage sticking and tagging.θ΄΄ηΊΈζ ‡η­Ύη›ΈζœΊ,εŠŸθƒ½:拍照,相片裁ε‰ͺ,给图片贴贴纸,打标签。
Stars: ✭ 3,109 (+1739.64%)
Mutual labels:  camera, photos
PhotosApp
React Native Photos App: AWS Amplify, AWS S3, Mobile Analytics with Pinpoint
Stars: ✭ 21 (-87.57%)
Mutual labels:  photos, camera
Spectaculum
A spectacular view widget for visual media content on Android
Stars: ✭ 78 (-53.85%)
Mutual labels:  camera, photos
MCamera
CameraViewController which allows to take photos, set filters, peform image blurring and more.
Stars: ✭ 28 (-83.43%)
Mutual labels:  photos, camera
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (+176.33%)
Mutual labels:  camera, photos
Chafu
A photo browser and camera library for Xamarin.iOS
Stars: ✭ 36 (-78.7%)
Mutual labels:  photos, camera
Gncam
πŸ“· A Swift 3 library for interacting with the camera on iOS using AVFoundation
Stars: ✭ 42 (-75.15%)
Mutual labels:  camera, photos
Media picker
A Flutter Plugin for Selecting and Taking New Photos and Videos.
Stars: ✭ 24 (-85.8%)
Mutual labels:  camera, photos
QuickRawPicker
πŸ“· QuickRawPicker is a free and open source program that lets you cull, pick or rate raw photos captured by your camera. It is also compatible with the XMP sidecar file used by Adobe Bridge/Lightroom/Darktable or PP3 sidecar file used by Rawtherapee.
Stars: ✭ 26 (-84.62%)
Mutual labels:  photos, camera
Swiftycam
A Snapchat Inspired iOS Camera Framework written in Swift
Stars: ✭ 1,879 (+1011.83%)
Mutual labels:  camera, photos
CameraSlider
3D printed and smartphone controlled camera slider
Stars: ✭ 16 (-90.53%)
Mutual labels:  photos, camera
Focus Points
Plugin for Lightroom to show which focus point was active in the camera when a photo was taken
Stars: ✭ 272 (+60.95%)
Mutual labels:  camera, photos
TuSDK-for-Android-demo
TuSDK Android 图像 SDK Demo
Stars: ✭ 93 (-44.97%)
Mutual labels:  photos, camera
Magicalcamera
A library to take picture easy, transform your data in different format and save photos in your device
Stars: ✭ 327 (+93.49%)
Mutual labels:  camera, photos
Pynet
Generating RGB photos from RAW image files with PyNET
Stars: ✭ 211 (+24.85%)
Mutual labels:  camera, photos
Agimagecontrols
cool tools for image edition
Stars: ✭ 217 (+28.4%)
Mutual labels:  camera, photos
Paparazzo
Custom iOS camera and photo picker with editing capabilities
Stars: ✭ 714 (+322.49%)
Mutual labels:  camera, photos
Pictureselectorlight
Picture Selector Library for Android or 图片选择器
Stars: ✭ 145 (-14.2%)
Mutual labels:  camera, photos

Annca

Download Android Arsenal Build Status API

Android solution to simplify work with different camera apis. Include video and photo capturing features with possibility to select quality for appropriate media action etc. In current solution were used some approaches from Grafika project and Google camera samples.

Forks

Some Annca's forks that can be useful if current functionality is not enought:

Example of using

Add Annca activities to the your app manifest file:

<activity
        android:name="io.github.memfis19.annca.internal.ui.camera.Camera1Activity"
        android:screenOrientation="portrait"
        android:theme="@style/ThemeFullscreen" />
<activity
        android:name="io.github.memfis19.annca.internal.ui.camera2.Camera2Activity"
        android:screenOrientation="portrait"
        android:theme="@style/ThemeFullscreen" />
<activity
        android:name="io.github.memfis19.annca.internal.ui.preview.PreviewActivity"
        android:screenOrientation="portrait"
        android:theme="@style/ThemeFullscreen" />

Please note that android:screenOrientation="portrait" is mandatory. In current implementation device rotation is detecting via sensor.

Don't forget to put permissions or request them:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

A code example of the most simple using:

 AnncaConfiguration.Builder builder = new AnncaConfiguration.Builder(activity, CAPTURE_MEDIA);
 new Annca(builder.build()).launchCamera();

and thats it. You can use more extended settings i.e.:

 AnncaConfiguration.Builder videoLimited = new AnncaConfiguration.Builder(activity, CAPTURE_MEDIA);
 videoLimited.setMediaAction(AnncaConfiguration.MEDIA_ACTION_VIDEO);
 videoLimited.setMediaQuality(AnncaConfiguration.MEDIA_QUALITY_AUTO);
 videoLimited.setVideoFileSize(5 * 1024 * 1024);
 videoLimited.setMinimumVideoDuration(5 * 60 * 1000);
 new Annca(videoLimited.build()).launchCamera();

in this example you request video capturing which is limited by file size for 5Mb and predefined minimum video duration for 5 min. To achieve this result Annca will decrease video bit rate, so use it carefully to avoid unexpected result (i.e. low quality).

How to get result?
 @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (requestCode == CAPTURE_MEDIA && resultCode == RESULT_OK) {
          String filePath = data.getStringExtra(AnncaConfiguration.Arguments.FILE_PATH);
      }
   }

How to add to your project?

compile 'io.github.memfis19:annca:0.3.7'

How to customize camera?

By customizing I mean change all avaliable camera controls(not camera preview) to take photos, video recording, quality settings and more in future. To be able to customize camera view you should create activity and extend it via AnncaCameraActivity<T>, where T is camera id type (due to that in camera 1 api camera ids represent as int values and in camera 2 api as string values). You should implement all requested methods. For more details please look at BaseAnncaActivity at library project. In future I will provide more detailed instructions how to do it, but anyway it is quite easy task. In case if you gave some troubles or questions, please use GitHub Issues.

Short summary:

-Extend your activity from AnncaCameraActivity<T>;

-Declare it in the manifest only in Portrait mode.

-Override all methods; -For method createCameraController use Camera1Controller or Camera2Controller respectively; -If you want to rotate your views do it inside onScreenRotation(int degrees) method; -For setting your camera contol layout use method getUserContentView(); -If you pass some parameters to your camera via bundle please use method onProcessBundle(Bundle savedInstanceState) which will be called before getUserContentView(); -In case you need to retrieve some data from camera controller or manager use in or after method onCameraControllerReady() was called.

Square camera

Sample app contains example of using square camera. Few words about it:

  1. Before appearing MediaCodec and MediaMuxer there were no ways to record video from specific surface (at least with native tools) that's why in current example I'm using view resizing to achieve square preview. Look at updateCameraPreview method within SquareCameraActivity.
  2. To make square photo I'm cropping origin, please look at onPhotoTaken method within SquareCameraActivity.
  3. To make square video I'm cropping origin with ffmpeg library, please look at onVideoRecordStop method within SquareCameraActivity. Conclusion: Becasue of some android limitations at least before API level 18 it is not possible to record square video. That's why to make solution more less generic I'm using crop outputs approach. In future I'll implement separate solution for API level 18+ to make possible apply more custom settings for camera (shaders, custom photo/preview/video sizes without cropping etc.).

Know issue

Library has not release yet, so it contains some issues.

Roadmap

-Improve determinig camera quality settings; -Extend annca configuration settings; -Add fragments supporting; -Add opengl supporting.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

LICENSE

MIT License
Copyright (c) 2016 Rodion Surzhenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].