Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

NAXAM/imagepicker-android-binding

Repository files navigation

RxJava2 for Xamarin.Android

ImagePicker for Xamarin.Android

A Xamarin.Android binding library for ImagePicker library.

A simple library to select images from the gallery and camera.

About

This project is maintained by Naxam Co.,Ltd.
We specialize in developing mobile applications using Xamarin and native technology stack.

Looking for developers for your project?


Installation

Install-Package Naxam.ImagePicker.Droid

How to use

Start image picker activity

  • Quick call
ImagePicker.Create(this)
            .FolderMode(true) // set folder mode (false by default)
            .FolderTitle("Folder") // folder selection title
            .ImageTitle("Tap to select") // image selection title
            .Single() // single mode
            .Multi() // multi mode (default mode)
            .Limit(10) // max images can be selected (999 by default)
            .ShowCamera(true) // show camera or not (true by default)
            .ImageDirectory("Camera")   // captured image directory name ("Camera" folder by default)
            .Origin(images) // original selected images, used in multi mode
            .Start(REQUEST_CODE_PICKER); // start image picker activity with request code

Receive result

protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
{
    if (resultCode == Result.Ok && requestCode == REQUEST_CODE_PICKER) {
        var pickedImages = data.GetParcelableArrayListExtra(ImagePickerActivity.IntentExtraSelectedImages);

        Toast.MakeText(this, $"You picked {pickedImages.Count} images", ToastLength.Short)
                .Show();
    }
}

Thanks

  • @NguyenHoangLam for his library in Java

License

ImagePicker binding library for Android is released under the MIT license. See LICENSE for details.

Get our showcases on AppStore/PlayStore

Try our showcases to know more about our capabilities.

Contact us if interested.



Follow us for the latest updates
Twitter URL Twitter Follow