sandriosCamera


Source link: https://github.com/sandrios/sandriosCamera

sandriosCamera

Camera Library for Android

sandrios camera allows developers to integrate image and video capturing without dealing with the complicated camera APIs.

It includes image picker interface inside the cameraview enabling the user to access recent media from inside the camera module.

Download

You can download an aar from GitHub's releases page.

Or use Gradle:

repositories {

 jcenter() 
}
  dependencies {

compile 'com.sandrios.android:sandriosCamera:1.0.9' 
}

Or Maven:

<dependency>
<groupId>com.sandrios.android</groupId>
<artifactId>sandriosCamera</artifactId>
<version>1.0.9</version>
<type>pom</type> </dependency>

ProGuard

Depending on your ProGuard (DexGuard) config and usage, you may need to include the following lines in your proguard.cfg

-keep public class com.sandrios.** {
 *; 
}
  -keep public class android.support.v7.widget.** {
 *; 
}
 -keep public class android.support.v7.internal.widget.** {
 *; 
}
 -keep public class android.support.v7.internal.view.menu.** {
 *; 
}
  -keep public class * extends android.support.v4.view.ActionProvider {

  public <init>(android.content.Context); 
}
  -dontwarn android.support.**  -keep public class * implements com.bumptech.glide.module.GlideModule -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {

**[] $VALUES;
public *; 
}
  -dontwarn com.yalantis.ucrop** -keep class com.yalantis.ucrop** {
 *; 
}
 -keep interface com.yalantis.ucrop** {
 *; 
}
  -keepattributes *Annotation* -keepclassmembers class ** {

  @com.squareup.otto.Subscribe public *;
  @com.squareup.otto.Produce public *; 
}

How do I use Sandrios Camera?

Please check the sample project included for more examples:

  private static final int CAPTURE_MEDIA = 368;
 // showImagePicker is boolean value: Default is true
private void launchCamera() {

 new SandriosCamera(activity, CAPTURE_MEDIA)

  .setShowPicker(showImagePicker)

  .setVideoFileSize(15) //File Size in MB: Default is no limit

  .setMediaAction(CameraConfiguration.MEDIA_ACTION_VIDEO) // default is CameraConfiguration.MEDIA_ACTION_BOTH

  .enableImageCropping(true) // Default is false.

  .launchCamera();

}

 @Override

protected void onActivityResult(int requestCode, int resultCode, Intent data) {

 super.onActivityResult(requestCode, resultCode, data);

  if (requestCode == CAPTURE_MEDIA && resultCode == RESULT_OK) {

  Log.e("File", "" + data.getStringExtra(SandriosCameraConfiguration.Arguments.FILE_PATH));

  Toast.makeText(this, "Media captured.", Toast.LENGTH_SHORT).show();

 
}

}

Status

  • Flash Mode (Testing Needed)

Comments/bugs/questions/pull requests are always welcome!

Compatibility

  • Android SDK: Sandrios Camera requires a minimum API level of 14.

Download

You may also find precompiled aar on the releases page.

Getting Help

To report a specific problem or feature request, open a new issue on Github. For questions, suggestions, or anything else -- [email protected]

Thanks

  • Glide for the Image Loading Framework
  • Ted Permission for the Permission Management in Android 23+
  • uCrop for the Image Cropping
  • Everyone who has contributed code and reported issues!

Author

sandrios studios - @sandrios on GitHub

License

MIT. See the LICENSE file for details.

Resources

Emmet is an protocol based data-transfer for Android Wear.

Dagger Play is a small set of reusable classes for Dagger injection. There many ways to implement Dagger into your project. Unfortunately memory leaks can occur easily if you implement it without attention.

Android AlertDialog with moving spots progress indicator packed as android library.

Tray - a SharedPreferences replacement for Android.

Android module that takes a square photo using the native Android Camera APIs. The new Camera2 APIs from the L release is not used.

WearViewStub allows your Android Wear application to use different layouts if running on square, round or moto360 device.

WearViewStub is an alternative implementation of Android Wear WatchViewStub. Instead of Google WatchViewStub, this implementation always works, even in Fragments of GridViewPager.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes