Ads

Thursday, November 28, 2013

Android Multi Image Picker Module

Multi Image Picker module helps to select multiple images from Gallery.

This module developed from existing Android open source library MultipleImagePick. And it uses Universal image loader library for asynchronous loading and caching.

Multiple Image Picker Screen

Features and Benefits:
  • Select multiple images - Option to select multiple images from Gallery and fast scroll over the Gallery
  • Maximum selection limit - Option to set maximum image selection limit
  • Custom button title and error message - There is a option to customize button title and error message
  • Method for scale down the bitmap - To avoid out of memory issue, this module has in build bitmap scale down method
  • Callback methods - Success, error and cancel callback methods

Usage: 
var gallerypicker = require('titutorial.gallerypicker');
gallerypicker.openGallery({
    cancelButtonTitle: "Cancel",
    doneButtonTitle: "Okay",
    title: "Custom Gallery",
    errorMessage: "Limit reached",
    limit: 10,
    success: function (e) {
        Ti.API.info("response is => " + JSON.stringify(e));
        var imgArray = e.filePath.split(",");

        for (var i = 0; i < imgArray.length; i++) {
            if (imgArray[i]) {
                var imgView = Ti.UI.createImageView({
                    left: '10dp',
                    top: '10dp',
                    image: gallerypicker.decodeBitmapResource(imgArray[i], 100, 100)
                });
                imageHolder.add(imgView);
            }
        }
    },
    error: function (e) {
        alert("error " + JSON.stringify(e));
    }
});

Download:
Source code : https://github.com/railskarthi/TiMultiImagePicker
Module : https://marketplace.appcelerator.com/apps/7215?1782767416

6 comments:

  1. How can I use same for multiple video picker?


    Please advice

    ReplyDelete
  2. No, this module only support for images.

    ReplyDelete
  3. So, do you know if it's possible to make one of the images the camera? This would be the same sort of control that tumblr uses for their app (which combines the gallery and the camera into one view)?

    ReplyDelete
  4. Hi, after associating the filePath to a variable (to create a tiBlob), I tried to upload it to a remote server, but it does not have 'file' nor 'nativePath' elements... My question is: how to get the 'media file' from your module (as if a picture was captured from the camera, with all its metadata)?
    Thanks,

    ReplyDelete
  5. hey, have u known the solution??

    ReplyDelete
  6. how to upload the selected images to remote server ???

    ReplyDelete