CPhoto

Android take photo library on coroutines

Лицензия

Лицензия

Группа

Группа

io.github.geniusrus
Идентификатор

Идентификатор

cphoto
Последняя версия

Последняя версия

3.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

CPhoto
Android take photo library on coroutines
Ссылка на сайт

Ссылка на сайт

https://github.com/GeniusRUS/CPhoto
Система контроля версий

Система контроля версий

https://github.com/GeniusRUS/CPhoto

Скачать cphoto

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.geniusrus/cphoto/ -->
<dependency>
    <groupId>io.github.geniusrus</groupId>
    <artifactId>cphoto</artifactId>
    <version>3.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/io.github.geniusrus/cphoto/
implementation 'io.github.geniusrus:cphoto:3.0.0'
// https://jarcasting.com/artifacts/io.github.geniusrus/cphoto/
implementation ("io.github.geniusrus:cphoto:3.0.0")
'io.github.geniusrus:cphoto:aar:3.0.0'
<dependency org="io.github.geniusrus" name="cphoto" rev="3.0.0">
  <artifact name="cphoto" type="aar" />
</dependency>
@Grapes(
@Grab(group='io.github.geniusrus', module='cphoto', version='3.0.0')
)
libraryDependencies += "io.github.geniusrus" % "cphoto" % "3.0.0"
[io.github.geniusrus/cphoto "3.0.0"]

Зависимости

runtime (8)

Идентификатор библиотеки Тип Версия
androidx.exifinterface » exifinterface jar 1.3.2
androidx.annotation » annotation jar 1.1.0
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.4.31
org.jetbrains.kotlinx : kotlinx-coroutines-android jar 1.4.3
androidx.activity » activity jar 1.2.0
androidx.activity » activity-ktx jar 1.2.0
androidx.fragment » fragment jar 1.3.0
androidx.fragment » fragment-ktx jar 1.3.0

Модули Проекта

Данный проект не имеет модулей.

CPhoto

Short description

Simple way to obtain picture from file system & photo with the Kotlin Coroutines

Details

If one of the conditions is not valid, then the corresponding exception is thrown:

  • ExternalStorageWriteException - if write access to the internal storage is not received
  • NotPermissionException - If the permission (API >= 23) to write to memory has been refused
  • CancelOperationException - if the user interrupted the operation of receiving photos

Thera are 3 types of returning values:

Bitmap,
Uri,
String (absolute path to file)

There are 5 types to obtaining images (TypeRequest):

CAMERA, - only from camera
GALLERY, - only from gallery
COMBINE, - combining two previous types
COMBINE_MULTIPLE, - same as COMBINE, but support multiple selection, requires API 16
FROM_DOCUMENT; - using Storage Access Framework, requieres API 19

Usage

  • Get photo from camera
val imageFromCamera = CRPhoto(context).requestBitmap(TypeRequest.CAMERA)
  • Is equal to
val imageFromCamera = this@context takePhotoBitmap TypeRequest.CAMERA

Install

Add to your .gradle file:

implementation 'com.geniusrus.cphoto:cphoto:$latest_version'

Sample

The sample is on app module

Developed by

  • Viktor Likhanov

Yandex: Gen1usRUS@yandex.ru

License

Apache v2.0 License

Copyright (c) 2018 Viktor Likhanov

Версии библиотеки

Версия
3.0.0