Skip to content

BottomSheet picker to select one or multiple files. Allows taking photos / videos / select from camera gallery / pick a different file

License

Notifications You must be signed in to change notification settings

quanturium/BottomSheetPicker

Repository files navigation

BottomSheetPicker

Core Build Status License

Picker Taking photo / video Multi-select of items
Picker Picker Picker

Table of Contents

  1. Demo
  2. Setup
  3. Getting Started
  4. License

Demo

Demo Video

Setup

The Gradle dependency is available via jcenter.

The minimum API level supported by this library is API 19.

The easiest way to add the Material DateTime Picker library to your project is by adding it as a dependency to your build.gradle

dependencies {
  compile 'com.quanturium.android:bottomsheetpicker:2.0.1'
}

Getting Started

Configuration

BottomSheetPicker requires some additional configurations made to your app's string and xml resources. Bottomsheetpicker uses a FileProvider which makes additional configuration necessary.

  • In your manifest.xml, add the following:
<provider
   android:name="android.support.v4.content.FileProvider"
   android:authorities="@string/file_provider_authority"
   android:exported="false"
   android:grantUriPermissions="true">
   <meta-data
       android:name="android.support.FILE_PROVIDER_PATHS"
       android:resource="@xml/file_paths"/>
</provider>
  • In your app's strings.xml file, add a string called 'file_provider_authority' and specify a value
<string name="file_provider_authority">FILE_PROVIDER_STRING_HERE</string>
  • In your app's xml directory, add a new file called 'file_paths.xml' (If the xml directory does not exist, create it under the app's res/ directory). The contents of this file should look like:
 <?xml version="1.0" encoding="utf-8"?>
 <paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="." />
 </paths>

Usage

See sample app for an example of using BottomSheetPicker with required runtime permissions.

License

Copyright (c) 2018 Arnaud Frugier & Steven Hong

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

BottomSheet picker to select one or multiple files. Allows taking photos / videos / select from camera gallery / pick a different file

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages