Skip to content

An android library to pick multiple images and/or videos from bulit-in gallery. 📷 💎 💥

License

Notifications You must be signed in to change notification settings

LunaTK/multiple-media-picker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Media Picker 💥 🌟

An android library to pick multiple images and/or videos from built-in gallery. This library is encouraged to use as little memory as possible.

Join the chat at https://gitter.im/Multiple-Media-Picker/Lobby

Feel free to ask(or request) me anything about it, just create an issue or join the gitter chat!

Usage

Include easily in your project adding the dependency to your build.gradle file.

dependencies {
  compile 'com.erikagtierrez.multiple_media_picker:multiple-media-picker:1.0.0'
}

Getting started

In the activity from where you want to call the library, declare

    static final int OPEN_MEDIA_PICKER = 1;  // Request code

and request permissions to read external storage

    Manifest.permission.READ_EXTERNAL_STORAGE

Create the intent

    Intent intent= new Intent(this, Gallery.class);
    //Set the title
    intent.putExtra("title","Select media");
    startActivityForResult(intent,OPEN_MEDIA_PICKER);

and override onActivityResult

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        // Check which request we're responding to
        if (requestCode == OPEN_MEDIA_PICKER) {
            // Make sure the request was successful
            if (resultCode == RESULT_OK && data != null) {
                 ArrayList<String> selectionResult=data.getStringArrayListExtra("result");
            }
        }
    }

Custom styles

The colors will be inherited from the class it was called.

License

Copyright 2016 Erika Gutierrez

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

An android library to pick multiple images and/or videos from bulit-in gallery. 📷 💎 💥

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%