jaydeepw / poly-picker Goto Github PK
View Code? Open in Web Editor NEWAndroid library project for providing multiple image selection from the device.
Android library project for providing multiple image selection from the device.
The GalleryFragment crashes when used standalone in another app. This is due to improper Activity type cast in GalleryFragment.
It appears that the image only comes back as thumbnail size. I didn't see anything in the demo app, that indicated the size of the photo. Please help, I could be doing something wrong.
Declare all ImagePickerActivity fields protected. This way we can extend it and change for our needs.
This library is one of my favorites. I do have a question though. Is there any way to start it without the camera and only let the user pick images from the gallery?
We can resort to using onSaveInstanceState to save the selected images when the activity restarts due to changes in the orientation but we will have to save the HashSet of the images there which cannot be done via the API.
We need to save such things using DB within the app and restore this data when the activity restarts.
The novice user may not understand what to do when the Parcelable[] is received.
Give better way to parse the items to Uri objects which can later be used.
App crash when opening ImagePickerActivity from a fragment.
Hi, sorry for the lenghty issue report. I am unable to build. The main error is Process 'command '/Users/fabiotiriticco/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
. Full exception after running ./gradlew assemble --stacktrace --info
is:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: org.gradle.internal.UncheckedException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/fabiotiriticco/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:66)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 47 more
Caused by: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/fabiotiriticco/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:42)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:780)
at com.android.builder.core.AndroidBuilder$processResources$1.call(Unknown Source)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.groovy:145)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.groovy:64)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
... 53 more
Caused by: org.gradle.process.internal.ExecException: Process 'command '/Users/fabiotiriticco/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:40)
... 58 more
Any idea where that might be coming from? Here's my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId ...
minSdkVersion 17
targetSdkVersion 22
versionCode 3
versionName "0.1.1"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
// exclude stuff from final build
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
lintOptions {
disable 'InvalidPackage'
}
}
repositories {
// maven central repository
mavenCentral()
// repository for crop image
maven { url 'http://lorenzo.villani.me/android-cropimage/' }
// repository for persistent search bar
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
// repository for multiple image pick
maven { url "https://repo.commonsware.com.s3.amazonaws.com" }
}
dependencies {
// include local jars (if any)
compile fileTree(dir: 'libs', include: ['*.jar'])
// android stuff
compile 'com.google.android.gms:play-services:7.3.0'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:cardview-v7:21.0.3'
// unit tests
androidTestCompile 'junit:junit:4.12'
// dagger for dependency injection.
// http://square.github.io/dagger/
// 'provided' means that we don't ship it with the APK.
// This is because we only need the dagger-compiler at compile time.
compile 'com.squareup.dagger:dagger:1.2.2'
provided 'com.squareup.dagger:dagger-compiler:1.2.2'
// retrofit for API interface
// http://square.github.io/retrofit/
compile 'com.squareup.retrofit:retrofit:1.9.0'
// okHttp for HTTP requests
// http://square.github.io/okhttp/
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.3.0'
// picasso for asynchronous image loading & caching
// http://square.github.io/picasso/
compile 'com.squareup.picasso:picasso:2.5.2'
// Otto for event publishing bus
// http://square.github.io/otto/
compile 'com.squareup:otto:1.3.6'
// JodaTime for Android
// https://github.com/dlew/joda-time-android
compile 'net.danlew:android.joda:2.7.1'
// facebook SDK for Android
compile 'com.facebook.android:facebook-android-sdk:3.22.0'
// floating action button
// https://github.com/futuresimple/android-floating-action-button
compile 'com.getbase:floatingactionbutton:1.9.0'
// butter knife for views injection
// http://goo.gl/2HBGLT
compile 'com.jakewharton:butterknife:6.1.0'
// super recycler view
// https://github.com/Malinskiy/SuperRecyclerView
compile 'com.malinskiy:superrecyclerview:1.1.0'
// websocket library
// https://github.com/TooTallNate/Java-WebSocket
compile "org.java-websocket:Java-WebSocket:1.3.0"
// snackbar for actions
// https://github.com/nispok/snackbar
compile 'com.nispok:snackbar:2.10.7'
// crop image
// see added repository on top
// https://github.com/lvillani/android-cropimage
compile 'me.villani.lorenzo.android:android-cropimage:1.1.0'
// circular image view for profile pictures
// https://github.com/hdodenhof/CircleImageView
compile 'de.hdodenhof:circleimageview:1.3.0'
// better date picker for birth date
// https://github.com/derekbrameyer/android-betterpickers
compile 'com.doomonafireball.betterpickers:library:1.5.5'
// material progress bar
// https://github.com/lsjwzh/MaterialLoadingProgressBar
compile('com.lsjwzh:materialloadingprogressbar:0.5.5-RELEASE')
// persistent search bar
// https://github.com/Quinny898/PersistentSearch
compile 'com.quinny898.library.persistentsearch:library:1.0.0-SNAPSHOT'
// material calendar
// https://github.com/prolificinteractive/material-calendarview
compile 'com.prolificinteractive:material-calendarview:0.3.2'
// time picker
// https://github.com/erz05/TimePicker
compile 'com.github.erz05:TimePicker:0.1.2@aar'
// multiple image pick
// https://github.com/jaydeepw/poly-picker
compile 'net.the4thdimension:poly-picker:1.0.11'
}
I would really like to be able to build and try out this library. Thanks for any help and sorry for the lenghty issue report.
Fabio
Very nice library, heres how to change texts (usefull for changing language):
public class MyImagePickerActivity extends ImagePickerActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().getTabAt(0).setText("Camera");
getActionBar().getTabAt(1).setText("Gallery");
((Button)findViewById(R.id.action_btn_cancel)).setText("Cancel");
((Button)findViewById(R.id.action_btn_done)).setText("Done");
((TextView)findViewById(R.id.selected_photos_empty)).setText("No image selected");
}
}
By the way, can you declare all ImagePickerActivity fields protected? Whis way we can extend it and change for our needs.
When I use this library, I am getting a force close everytime I attempt to take a camera photo using the S4. It is not occurring when I use an LG G2.
Scenario:
03-17 15:41:48.843 6484-6484/com.b2.assyrian.activity D/Dialog﹕ checkMirrorLinkEnabled returns : false
03-17 15:41:48.843 6484-6484/com.b2.assyrian.activity D/Dialog﹕ showing allowed
03-17 15:41:48.963 6484-6484/com.b2.assyrian.activity D/ProgressBar﹕ updateDrawableBounds: left = 0
03-17 15:41:48.963 6484-6484/com.b2.assyrian.activity D/ProgressBar﹕ updateDrawableBounds: top = 0
03-17 15:41:48.963 6484-6484/com.b2.assyrian.activity D/ProgressBar﹕ updateDrawableBounds: right = 102
03-17 15:41:48.963 6484-6484/com.b2.assyrian.activity D/ProgressBar﹕ updateDrawableBounds: bottom = 102
03-17 15:41:50.054 6484-7118/com.b2.assyrian.activity D/dalvikvm﹕ GC_FOR_ALLOC freed 719K, 48% free 36322K/68756K, paused 62ms, total 63ms
03-17 15:41:50.164 6484-7118/com.b2.assyrian.activity I/dalvikvm-heap﹕ Grow heap (frag case) to 75.326MB for 38340880-byte allocation
03-17 15:41:50.404 6484-7118/com.b2.assyrian.activity D/dalvikvm﹕ GC_FOR_ALLOC freed 30K, 31% free 73734K/106200K, paused 31ms, total 31ms
03-17 15:41:50.404 6484-7118/com.b2.assyrian.activity I/dalvikvm-heap﹕ Forcing collection of SoftReferences for 38340880-byte allocation
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity D/dalvikvm﹕ GC_BEFORE_OOM freed 78K, 31% free 73655K/106200K, paused 42ms, total 42ms
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity E/dalvikvm-heap﹕ Out of memory on a 38340880-byte allocation.
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ "Thread-661" prio=5 tid=27 RUNNABLE
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ | group="main" sCount=0 dsCount=0 obj=0x42d251e0 self=0x73ac8fd8
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ | sysTid=7118 nice=0 sched=0/0 cgrp=apps handle=2106290368
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ | state=R schedstat=( 0 0 0 ) utm=31 stm=12 core=2
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ at android.graphics.Bitmap.nativeCreate(Native Method)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:929)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:902)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:834)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ at com.commonsware.cwac.camera.ImageCleanupTask.run(ImageCleanupTask.java:121)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity I/dalvikvm﹕ [ 03-17 15:41:50.444 6484: 7118 W/dalvikvm ]
threadid=27: thread exiting with uncaught exception (group=0x41b6eda0)
03-17 15:41:50.444 6484-6484/com.b2.assyrian.activity I/Choreographer﹕ Skipped 30 frames! The application may be doing too much work on its main thread.
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ java.lang.OutOfMemoryError
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.nativeCreate(Native Method)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:929)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:902)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:834)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at com.commonsware.cwac.camera.ImageCleanupTask.run(ImageCleanupTask.java:121)
03-17 15:41:50.444 6484-6507/com.b2.assyrian.activity E/BufferQueue﹕ [unnamed-6484-0] dequeueBuffer: min undequeued buffer count (2) exceeded (dequeued=11 undequeudCount=0)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ java.lang.OutOfMemoryError
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.nativeCreate(Native Method)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:929)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:902)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at android.graphics.Bitmap.createBitmap(Bitmap.java:834)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity W/System.err﹕ at com.commonsware.cwac.camera.ImageCleanupTask.run(ImageCleanupTask.java:121)
03-17 15:41:50.444 6484-7118/com.b2.assyrian.activity E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-661
Process: com.b2.assyrian.activity, PID: 6484
java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:929)
at android.graphics.Bitmap.createBitmap(Bitmap.java:902)
at android.graphics.Bitmap.createBitmap(Bitmap.java:834)
at com.commonsware.cwac.camera.ImageCleanupTask.run(ImageCleanupTask.java:121)
My code:
Intent intent = new Intent(view.getContext(), ImagePickerActivity.class);
intent.putExtra(ImagePickerActivity.EXTRA_SELECTION_LIMIT, 9);
startActivityForResult(intent, INTENT_REQUEST_GET_IMAGES);
exception thrown:
Caused by: java.lang.NullPointerException
at nl.changer.polypicker.ImagePickerActivity.setupActionBar(ImagePickerActivity.java:104)
at nl.changer.polypicker.ImagePickerActivity.onCreate(ImagePickerActivity.java:83)
at android.app.Activity.performCreate(Activity.java:5020)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:99)
Any help? Thanks.
Add it as a parameter to the configuration before launching the ImagePickerActivity.
There are times when the content uri of the saved images will be required by the application using the library. Make such provision by sending the image model as parcelable in the intent itself.
please , you can push it into maven central.
hi jaydeep...its a very nice and useful library...in my case everything is working fine..but the camera preview is not showing only at Micromax A116 having android ver. 4.1.2 ( at screenshot 1 where no camera preview is shown)..but on click to capture button...just for instance the preview show and then disappear... i'm unable to understand the problem...any help is appreciated...thanks
device : optimous vu2
os : 4.4.2
take piture error camera error
8-27 16:02:51.797 13048-13048/nl.changer.polypickerdemo E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: nl.changer.polypickerdemo, PID: 13048
java.lang.NullPointerException: uriString
at android.net.Uri$StringUri.(Uri.java:467)
at android.net.Uri$StringUri.(Uri.java:457)
at android.net.Uri.parse(Uri.java:429)
at nl.changer.polypicker.CameraFragment.onPictureTaken(CameraFragment.java:65)
at android.hardware.Camera$EventHandler.handleMessage(Camera.java:954)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5129)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
will you please add bucket list ,so we can choose album first.
When I take a picture with a cell phone with a small screen its appears in small size in a corner and with a green background
https://www.dropbox.com/s/u468sd71seae3kd/Photo_20150514_171737.jpg?dl=0
Please somebody could help me how could I save the image taken with GPS location ? Cause I have to get this after with ExifInterface.
Thanks in advance !
If the user has set the LIMIT = 1, just return it without allowing anymore multiple selection.
If the user sets the LIMIT = 0, throw an exception.
Hey, is it possible to change the fragment order without library rebuild?
In my use case, gallery would be 1st choice.
I'd suggest adding a variable to nl.changer.polypicker.Config.
Hi, please I got this error when I use the app with Xperia S (LT26i)
java.lang.RuntimeException: startPreview failed
at android.hardware.Camera.startPreview(Native Method)
at com.commonsware.cwac.camera.CameraView.j(CameraView.java:533)
at com.commonsware.cwac.camera.CameraView.a(CameraView.java:528)
at com.commonsware.cwac.camera.CameraView.b(CameraView.java:511)
at com.commonsware.cwac.camera.TexturePreviewStrategy.onSurfaceTextureAvailable(TexturePreviewStrategy.java:45)
at android.view.TextureView.getHardwareLayer(TextureView.java:368)
at android.view.View.getDisplayList(View.java:12511)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.getDisplayList(View.java:12540)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.getDisplayList(View.java:12540)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.getDisplayList(View.java:12540)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.draw(View.java:13594)
at android.support.v4.view.ViewPager.draw(ViewPager.java:2176)
at android.view.View.getDisplayList(View.java:12542)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.getDisplayList(View.java:12540)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.draw(View.java:13594)
at android.widget.FrameLayout.draw(FrameLayout.java:479)
at android.view.View.getDisplayList(View.java:12542)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.getDisplayList(View.java:12540)
at android.view.View.getDisplayList(View.java:12586)
at android.view.View.draw(View.java:13315)
at android.view.ViewGroup.drawChild(ViewGroup.java:3037)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2907)
at android.view.View.draw(View.java:13594)
at android.widget.FrameLayout.draw(FrameLayout.java:479)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2189)
at android.view.View.getDisplayList(View.java:12542)
at android.view.View.getDisplayList(View.java:12586)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1168)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2157)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2029)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1840)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1004)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4223)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
1.0.13
use appcompat support library latest version for this. The theme used shall also be Theme.AppCompat.
Hi,
I really like your great job of this lib , when I try to import the lib to Android Studio(0.8.11) which does show import successfully, but I can't access ImagePickerActivity in code anyway. Then I try to import aar file directly, it does not work ,too. Any hint on that?
Thanks.
library is crashing while taking picture when my device has no images in gallery.
Fortunately i dont store photos in mobile.so i get the error.
please solve this issue as soon as possible man, as i have to make my project live in 2 weeks.
i really loved your work. keep it up.
Thanks in advance.
Hey, nice project. I tried this in a hobby project and works great.
One small issue though, the flash does not work (tried various combinations). Am I missing something or has it not been implemented? If it is one, if you could point me in some direction, I'd be happy to build it and send a PR.
Thank you!
Could you please update the android:text to use @string/no_images_selected ? thanks.
The sample can be located in the app creation wizard in Android Studio.
Some mobile phone have a exception when take a picture。
java.lang.IllegalStateException: Unable to create new file: /storage/sdcard0/DCIM/Camera/1418805137509.jpg
cause this code :String path = MediaStore.Images.Media.insertImage(getActivity().getContentResolver(), bitmap, getPhotoFilename(), null);
I think this exception maybe with some mobile phone sdcard path diffenrent
could you help me to solve this question, thanks a lot.
Integrate Travis CI for Automated builds and realtime logging
add this android:theme="@style/AppTheme"
i18n support, please.
Why the photos taken are stored 2 versions ?
both in /DCIM/...
and /Pictures/...
uri: /storage/emulated/0/Pictures/1431406896165.jpg
uri: /storage/emulated/0/DCIM/Photo_20150512_120139.jpg
Can anyone tell me how to remove one creation process ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.