GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - samkazmi/SimpleImageSelect: Easy to Use Single Image Picker for android, Pick Image from Gallery apps or Camera.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
app
app
 
 
gradle/wrapper
gradle/wrapper
 
 
simpleimageselect
simpleimageselect
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

SimpleImageSelect

Easy to use Image Picker library

  • minSdkVersion 10

Installation

Step 1. Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        compile 'com.github.samkazmi:SimpleImageSelect:1.0'
	}

How it works?

First

Initalize some variables in your onCreate method

SimpleImageSelect.Config(this, "Choose Profile Picture from", "FolderName");

FolderName is the name of the folder where your selected image will be saved it uses ExternalStorage for now to save files.

Then

Displays a chooser with both image and camera option
SimpleImageSelect.chooseSingleImage(Config.TYPE_CHOOSER_BOTH, this);
Direclty open's camera
 SimpleImageSelect.chooseSingleImage(Config.TYPE_CAMERA, this);
Displays a chooser for gallery apps only
SimpleImageSelect.chooseSingleImage(Config.TYPE_CHOOSER_GALLERY_ONLY, this);

Note: If you are using this method in a fragment you must use this as the second param

To Get Picked Image
try {
           String path = SimpleImageSelect.onActivityResult(this, requestCode, resultCode, data);
           if (path != null) {
               Log.v("MainActiviy", "app: " + path);
           }
       } catch (IOException e) {
           e.printStackTrace();
       } try {
           String path = SimpleImageSelect.onActivityResult(this, requestCode, resultCode, data);
           if (path != null) {
               Log.v("MainActiviy", "app: " + path);
           }
       } catch (IOException e) {
           e.printStackTrace();
       }

Also add these permissions in your manifest file

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
and lastly to clear config variables
SimpleImageSelect.ClearConfig(this);

About

Easy to Use Single Image Picker for android, Pick Image from Gallery apps or Camera.

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.