debuggerman

Library for work with local media storage on Android.

Лицензия

Лицензия

Категории

Категории

SBE Данные Data Structures
Группа

Группа

com.rosberry.android
Идентификатор

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

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

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

1.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

debuggerman
Library for work with local media storage on Android.
Ссылка на сайт

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

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

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

https://github.com/rosberry/LocalMediaProvider.git

Скачать debuggerman

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

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-android-extensions-runtime jar 1.3.50
androidx.constraintlayout » constraintlayout jar 1.1.3
com.rosberry.android : AbstractRecycler aar 1.0.0

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

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

Local Media Provider

The library is providing an easy way to fetch media files (photo and video) from media storage.

Requirements

Android API 21+

Usage

Add a dependency:

implementation 'com.rosberry.android:LocalMediaProvider:0.1.0'

Query files

val mediaList = MediaProvider(context).getLocalMedia(
    folderId = NO_FOLDER_ID,
    limit = NO_LIMIT,
    filterMode = FilterMode.ALL,
    sortingMode = SortingMode.DATE,
    sortingOrder = SortingOrder.DESCENDING
)

Use getLocalMedia method to query files, which return a list of LocalMedia. You can customize your query with arguments:

  • folderId - id of the folder in which to query (default is NO_FOLDER_ID)
  • limit - limit of the query (default is NO_LIMIT)
  • filterMode - can be ALL, VIDEO or IMAGE (default is ALL)
  • sortingMode - can be NAME, DATE, SIZE, TYPE or NUMERIC (default is DATE)
  • sortingOrder - can be ASCENDING or DESCENDING (default is DESCENDING)

Listen media updates

interface MediaUpdatesCallback {
    fun onChange(selfChange: Boolean)
}

Register callback with MediaProvider.registerMediaUpdatesCallback. MediaUpdatesCallback.onChange method will be invoked whenever content change occurs. Don't forget to unregister callback with MediaProvider.unregisterMediaCallback when it isn't using.

⚠️ Attention MediaUpdateCallback is publishing the events on the main thread.

About

This project is owned and maintained by Rosberry. We build mobile apps for users worldwide 🌏 .

Check out our open source projects, read our blog or give us a high-five on 🐦 @rosberryapps.

License

Image Cropper is available under the Apache License 2.0. See the LICENSE file for more info.

com.rosberry.android

Rosberry

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

Версия
1.0.0