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.
You can download an aar from GitHub's releases page.
Or use Gradle:
repositories {
jcenter()
}
dependencies {
compile 'com.sandrios.android:sandriosCamera:1.0.4'
}
Or Maven:
<dependency>
<groupId>com.sandrios.android</groupId>
<artifactId>sandriosCamera</artifactId>
<version>1.0.4</version>
<type>pom</type>
</dependency>
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 *;
}
-keepattributes *Annotation*
-keepclassmembers class ** {
@com.squareup.otto.Subscribe public *;
@com.squareup.otto.Produce public *;
}
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, showImagePicker)
.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();
}
}
- Flash Mode (WIP)
Comments/bugs/questions/pull requests are always welcome!
- Android SDK: Sandrios Camera requires a minimum API level of 14.
You may also find precompiled aar on the releases page.
To report a specific problem or feature request, open a new issue on Github. For questions, suggestions, or anything else, email mailto:[email protected]
Before submitting pull requests, contributors must sign Google's individual contributor license agreement.
- Glide for the Image Loading Framework
- Ted Permission for the Permission Management in Android 23+
- Everyone who has contributed code and reported issues!
sandrios studios - @sandrios on GitHub
MIT. See the LICENSE file for details.
This is not an official Google product.