debuggerman

Library for work with local media storage on Android.

License

License

Categories

Categories

SBE Data Data Structures
GroupId

GroupId

com.rosberry.android
ArtifactId

ArtifactId

debuggerman
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

aar
Description

Description

debuggerman
Library for work with local media storage on Android.
Project URL

Project URL

https://github.com/rosberry/LocalMediaProvider.git
Source Code Management

Source Code Management

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

Download debuggerman

How to add to project

<!-- 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"]

Dependencies

compile (3)

Group / Artifact Type Version
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

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.0